GC and Exceptions in Wasmtime
- Programming
- Infrastructure
- Developer Tools
- Open Source
The post explains how Wasmtime implemented two newer WebAssembly proposals: garbage-collected references for managed languages and exception handling for nonlocal control flow. Under the hood, Wasmtime does not hand these GC objects to the host as raw pointers. It stores them in sandboxed linear memory and uses 32-bit indices as references. The piece positions this as a way to keep Wasm’s isolation model while making languages beyond the usual Rust and C set more viable.
If you are evaluating Wasm beyond Rust and C, separate "engine support landed" from "your language runtime now fits." GC and exceptions make Java-style targets more practical, but Go and .NET still do not map cleanly, and features like stack switching and threads remain gating items for broader app-platform ambitions.
-
bytecodealliance.org
- Discuss on HN