Build hello_world.c
using
emcc hello_world.c -Os -s WASM=1 -s SIDE_MODULE=1 -o hello_world.wasm
(make sure to use latest Emscripten incoming). That creates a
WebAssembly dynamic libraryhello_world.wasm
. You can then run
hello_world.html
in your browser, which loads and uses it.
More details: https://github.com/kripken/emscripten/wiki/WebAssembly-Standalone
I'm trying to do the same thing, but with node, and am running into an issue:
no errors, but the output is
{"exports":{}}
, which doesn't seem to include the export of_doubler
. compilation seems fine, as it works in the web version:any help would be greatly appreciated. this is a step toward easy use in plv8.
thanks!