← Back to context

Comment by ncruces

12 hours ago

Shameless plug… compiling it to Go is a great option too: https://github.com/ncruces/wasm2go

I've used it to translate SQLite (with a few extensions) and, that I know of, it's been used (to varying degrees of success) to translate the MARISA trie library (C++), libghostty (Zig), zlib, Perl, and QuickJS.

More on-topic, I use a mix of an unevaluated expression stack and a stack-to-locals approach to translate Wasm.

Interesting. I started working on this same idea a couple of years ago as a way to bypass CGo. Eventually I moved on to something else. Glad someone else is working on this. How does the generated Go performance compare to the original WASM performance?

Does that mean you could compile a wasm program to go, then run it with wazero? How many levels deep can it go?? Might be a fun blog topic :)