Dear Developers:
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!