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
Why it's there a
_
preffix ? It's breaking function for me, it works well after I remove it. Was it something in the past versions ? ( used emcc 1.39.8 ; clang version 11.0.0 )