Hi, all.
WASM support is quite attractive to me, but documentation is rare at this point.
For testing purposes I want to embed following code on my website:
library sitehelpers;
uses sysutils;
function visitedAt(): AnsiString;
begin
visitedAt := DateTimeToStr(Now, false) + ' (Systemtime)';
end;
exports
visitedAt;
End.
Some explanations:
a) Due to the fact the "embedded" target only compiles libraries and units I choose "library", this generates a binary withaout wasm-extention.
b) neither the direct saved wat (-a switch) nor the reversed one (wasm2wat) contain an export statement for vsitedAt(), but a complicated mangled name for it. Both files are provided in the attached archive.
c) compiling it as a program in WASI-mode builds an executble (with .wasm extention) , which runs in wasmtime but doesn't work in my browsers.
Thanks in advance and greets,
Jonathan