“There are platforms that accept WebAssembly-sandboxed code for security reasons, as it ensures complete memory isolation between requests while remaining very fine-grained (hence with lower overheads).”
What are those platforms? Does anyone use them? Eg i am aware of fastly, docker support for wasm. However looking at how raw various wasm tooling for golang is, does not seem like there is much actual use
One thing that has been misunderstood is that WASM is “universal” – for any language
For Go, WASM 1 is awkward, because you have to ship a GC with it.
WASM GC is probably also awkward for Go, because the garbage-collected heap in Go requires tracing pointers into the middle of objects (interior pointers). You would have to compile Go to something pretty inefficient to get around this.
Also Goroutines aren’t in the WASM machine model, etc.
WASM 1 is a better fit for C, C++, Rust, and Zig – although you still have to ship an allocator. That’s a lot less complex than shipping a GC though.
WASM GC is better for languages like Java.
So the “fit” of the language and the WASM runtime still matters … people like to say it’s “universal”, but like any other technology, it is a compromise
“There are platforms that accept WebAssembly-sandboxed code for security reasons, as it ensures complete memory isolation between requests while remaining very fine-grained (hence with lower overheads).”
What are those platforms? Does anyone use them? Eg i am aware of fastly, docker support for wasm. However looking at how raw various wasm tooling for golang is, does not seem like there is much actual use
One thing that has been misunderstood is that WASM is “universal” – for any language
For Go, WASM 1 is awkward, because you have to ship a GC with it.
WASM GC is probably also awkward for Go, because the garbage-collected heap in Go requires tracing pointers into the middle of objects (interior pointers). You would have to compile Go to something pretty inefficient to get around this.
Also Goroutines aren’t in the WASM machine model, etc.
WASM 1 is a better fit for C, C++, Rust, and Zig – although you still have to ship an allocator. That’s a lot less complex than shipping a GC though.
WASM GC is better for languages like Java.
So the “fit” of the language and the WASM runtime still matters … people like to say it’s “universal”, but like any other technology, it is a compromise
it’s still immature even for C, lack of longjmp/setjmp hurts
Previous posts on this project: part 2 (0 comments) and part 3 (2 comments