* WasmEdge library import

This commit is contained in:
Michaël Van Canneyt 2023-10-25 15:07:20 +02:00
parent 1f8865454b
commit 01589aa693
6 changed files with 1182 additions and 0 deletions

View File

@ -149,6 +149,7 @@
add_qlunits(ADirectory+IncludeTrailingPathDelimiter('qlunits'));
add_mustache(ADirectory+IncludeTrailingPathDelimiter('fcl-mustache'));
add_wasmtime(ADirectory+IncludeTrailingPathDelimiter('wasmtime'));
add_wasmedge(ADirectory+IncludeTrailingPathDelimiter('wasmedge'));
add_gitlab(ADirectory+IncludeTrailingPathDelimiter('gitlab'));
add_fcl_css(ADirectory+IncludeTrailingPathDelimiter('fcl-css'));
add_gstreamer(ADirectory+IncludeTrailingPathDelimiter('gstreamer'));

View File

@ -851,6 +851,12 @@ begin
{$include wasmtime/fpmake.pp}
end;
procedure add_wasmedge(const ADirectory: string);
begin
with Installer do
{$include wasmedge/fpmake.pp}
end;
procedure add_gstreamer(const ADirectory: string);
begin
with Installer do

View File

@ -0,0 +1,2 @@
PACKAGE_NAME=wasmedge
include ../build/Makefile.pkg

View File

@ -0,0 +1,42 @@
{$ifndef ALLPACKAGES}
{$mode objfpc}{$H+}
program fpmake;
uses {$ifdef unix}cthreads,{$endif} fpmkunit;
Var
P : TPackage;
T : TTarget;
begin
With Installer do
begin
{$endif ALLPACKAGES}
P:=AddPackage('wasmedge');
P.ShortName:='wasmedge';
P.Description := 'Interface unit wasmedge webassembly library.';
{$ifdef ALLPACKAGES}
P.Directory:=ADirectory;
{$endif ALLPACKAGES}
P.Version:='3.3.1';
P.SourcePath.Add('src');
P.OSes := [linux,darwin,win64];
P.CPUs:=[x86_64];
T:=P.Targets.AddUnit('libwasmedge.pp');
{
// Need to convert wasmtime examples to wasmedge
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('helloworld.pp');
P.Targets.AddExampleProgram('gcd.pp');
P.Targets.AddExampleProgram('memory.pp');
P.Targets.AddExampleProgram('wasi.pp');
}
P.NamespaceMap:='namespaces.lst';
{$ifndef ALLPACKAGES}
Run;
end;
end.
{$endif ALLPACKAGES}

View File

@ -0,0 +1,3 @@
unit Api.WasmEdge;
{$DEFINE FPC_DOTTEDUNITS}
{$i libwasmedge.pp}

File diff suppressed because it is too large Load Diff