Dear Developers:
https://v8.dev/blog/emscripten-standalone-wasm provides an excellent
description about how to compile a stand-alone WASM via emcc.
However, in the case of the syscalls still needs emscripten defined files,
we will still need an emscripten generated file, and that means
we will need to interact with the WASM via the emscripten Javascript
wrapper, e.g. Module.wrap, and call
Recently we start to look into directly build our js interface on top of
the WASM js API.
I am wondering if it is possible to directly interact with the wasm module
generated by emscripten via the standard WASM js interface,
but still make these additional emscripten syscalls available.
In particular, I am looking for something like
emcc -O3 mylib.c -o mylib.js -s STANDALONE_WASM
Then
const binary = require('fs').readFileSync('mylib.wasm');
// this line ontains the emscripten defined syscalls as a imports
// that can be passed to the WebAssembly interface.
imports_with_emscripten_sycalls = getEnv("mylib.js");
WebAssembly.instantiate(binary, imports_with_emscripten_sycalls);
Thank you!
TQ
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/4dda2146-9bb7-4d5e-abc9-adeb505ef029%40googlegroups.com.