Hacker News new | ask | show | jobs
by pionar 3022 days ago
I believe the grandparent was talking about machine-language. Take some WASM, produce an EXE, for example.
2 comments

In this context, "native" and "machine-language" are synonymous, and V8/Node do in fact generate native code/machine-language from WASM. The GP did correctly answer the OP's question, but it's not clear if the OP had a more specific question in mind.

The phrase you're looking for is "Ahead-of-Time" or "AoT" compiler. It's not clear if the OP was specifically looking for an AoT compiler, or if a JIT suffices for her/his use case.

I don't really think there is any demand for that. The generated WASM code is already optimized. The JIT is basically a very fast AOT compiler. The only advantage you're gaining is faster startup time and that could perhaps be achieved by caching the generated machine code on disk.
I compiled a GB emulator written in WASM to Rust yesterday and benchmarked it. The Rust one was about 7 times faster.