Wasmtime 47 Enables GC and Exceptions for High-Level Languages
GC and Exceptions in Wasmtime
We are thrilled to announce that Wasmtime 47 now enables the WebAssembly GC and exceptions proposals by default. This milestone allows high-level languages to target WebAssembly more efficiently without embedding custom garbage collectors or managing complex exception handling manually. Our implementation prioritizes correctness and safety, leveraging linear memories to ensure portability across diverse platforms while optimizing for horizontal scaling in production environments.
WebAssembly promises to be fast, safe, and portable, but it is the runtime that must actually shoulder that responsibility in its implementation.
- faldor20
It seems like a bit of a shame that wasm got support for exceptions but doesn't support effects which are a generalisation of the same concept.
I'm guessing this may be because exceptions exclusively require stack unwinding where as effects require full stack switching.
Seems like there is still progress on that though which gives hope https://github.com/WebAssembly/stack-switching/blob/main/pro...
- torginus
Just checked and out of the 3 major non-JS GC languages, Go and .NET aren't planning to support WASM GC due to non-matching semantics. There's an implementation for Java - TeaVM, which is an AOT Java compiler, that does have production grade support, but isn't aiming for full Java compatibility (not sure what this means in practical terms).
Native interop with JS objects on the JS GC heap isn't supported as well.
- rbbydotdev
I'm personally excited for a better thread story (not web-workers) and JIT
- ngrilly
Does it support interior pointers?
- shevy-java
WASM will be ready when GNU Hurd succeeds in running the desktop linux of the year. Already 10 years since WASM ... HTML, CSS and JavaScript all had a huge influence. WAS simply has not done so yet.