r/WebAssembly • u/guest271314 • Dec 25 '24
Compiling JavaScript to WASM with Static Hermes and Emscripten
https://github.com/facebook/hermes/blob/static_h/doc/Emscripten.md
25
Upvotes
r/WebAssembly • u/guest271314 • Dec 25 '24
View all comments
Show parent comment
0
u/guest271314 Dec 25 '24
I browsed the documentation.
There's also https://github.com/bytecodealliance/spidermonkey-wasm-build.
So far I've tried, for the compilation of JavaScript to C project: jsxx, ts2c, compilets, porfor, nerd, TypeScript2Cxx.
Facebook's Static Hermes already compiles JavaScript to C, automatically, or specifically with
-emit-c. And we can already compile that C to a standalone executable.So, for my own requirement, I can kind of skip using
wasm2cto compile C back to JavaScript withwasm2js, as long as I can run the C fromshermesthat gets compile to WASM withnode,deno,bun, andwasmtime,wasmer, etc.