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

This is really cool and shows WASM's power as a glue for different programming languages (that support building to WASM). What I wonder about is how well different Rust libraries support WASM, since this seems to be a requirement for this to work, do libraries need to be careful about ensuring WASM support or is it mostly free?



I think it depends on what your WASM runtime supports. The OP here is using a runtime called Wazero, which looks like it supports the first prototype of the WASI standard. You can think of WASI like libc for WASM, where it defines interfaces for operating with the underlying system. But WASI is still young and changing, and doesn't support everything that a program might want to do. And certain contexts, like web browsers, probably have no interest in providing runtimes that have full WASI support.

If you're interested, I'd suggest compiling a crate for WASI and seeing if you get compilation errors. You can do so by cross-compiling for the `wasm32-wasi` target (`rustup toolchain install wasm32-wasi`, then `cargo build --target wasm32-wasi`). If your program tries to use any stdlib facilities that don't exist on that target, it will tell you.


The same glue that IBM and Unisys mainframes and micros have been enjoying for decades, .NET since 2002, among other examples.




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

Search: