Which file is used to actually run the executable (possibly through
.js file is used to load the
.wasm for bootstrapping, it acts as a launcher.
But it is actually possible to ask emscripten to generate only the
.js (if you don’t want webassembly support),
.wasm if you don’t care about the small
.js wrapper, and even a combination of html+js+wasm if you chose to use the default
Those are not the defaults of the toolchain however, but can be triggered either using compile options or changing the target file extension (ie, change the
CMAKE_CROSSCOMPILING_EMULATOR, it seems node.js was chosen by the maintainers, and uses
In the end, the
.wasm file is kind of a library that you can run through the
.js file, but is not mandatory if you don’t target web assembly.
I think it should be seen as a shared library that you can’t link (though I heard that there is now experimental support for shared libraries…).