Shum
Shum

Reputation: 1276

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?

Upvotes: 13

Views: 5673

Answers (1)

sbc100
sbc100

Reputation: 3032

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

Upvotes: 12

Related Questions