Search code examples
webassemblytranspiler

Compile webassembly to native executable


Are there any tools (yet) which can compile a wasm module to a native executable (eg. an ELF or .exe file)? Something like emscripten but in reverse. Failing that, is there any other way to run webassembly outside of a browser?


Solution

  • There is a wabt tool called wasm2c which can convert your wasm module to C. This can then be compiled to native code: https://github.com/WebAssembly/wabt/tree/master/wasm2c