Hacker News new | past | comments | ask | show | jobs | submit login

TL;DR: Instead of building Rust shared library for every OS/arch combination to use it from Go program, produce WASM chunk from Rust and load/execute it in Go using wazero.



The interesting bit for me was that executing the moderately nontrivial wasm fn took <1ms. That makes it more practical than I'd have expected.


I wonder what the performance penalty is compared to running directly on native machine code.


I believe wasm is usually within 2x of native machine code, with the caveat that it can’t do simd or multi threading.


It can in latest versions of the standard, but it is still far from what JVM and CLR bytecodes offer in the box.


I think the wasm runtime they used compiled it to native on program boot, so I’d guess the penalty is really only on startup time?


I have no experise, but my gut feeling is that the sandboxing should still add some cost?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: