3 ms·
I did some WebAssembly targeting with a toy SQL to WASM compiler recently and imo the ecosystem is still not that mature. There's no real multi-module linking
by cube2222 3y ago
I did some WebAssembly targeting with a toy SQL to WASM compiler recently and imo the ecosystem is still not that mature.
There's no real multi-module linking right now, which means that for I.e. a runtime library you'll end up 1. Compiling the runtime library to wasm 2. Editing that wasm code in place to add your generated code (that uses runtime functions). And that's a bit hacky.
Fingers crossed for the component model to solve this, but LLVM is definitely much more mature (and can compile down to WASM, and vice versa). In the end, for toy projects, both are great fun, and WASM is definitely more "cutting edge".
Btw. I do recommend using Rust for playing with WASM. Wazero is awesome (and it's what I used) but all the experimental features of WASM that are very useful (like 64 bit memory support) are not available here yet. Wasmtime and wasmer are probably the most popular engines (other than V8), both are in Rust, and both have a lot of experimental features implemented and activatable. Their bindings in other languages aren't as complete in that regard.