A Compiler Author’s Guide to WebAssembly GC
summary
Grain compiler transitions from linear memory to the WebAssembly GC proposal and ships a runtime heap instead of in-module reference counting, so removed reference counting and kept a minimal allocator for component/Interface Types work. Binary size for an empty module falls from about 3,91 bytes to 292 bytes, with hello world shrinking ~35%. Benchmarks with a 10M-element linked list and big-number allocs show Wasmtime slightly slower but V8 gives ~10x speedup and WasmEdge interpreter shows ~5x; practical quirks include non-nullable-local validation, struct-walking codegen, and buffer i8 load/store limits.
AI-written summary · about
chapters (8)
- 0:00WebAssembly GC intro
- 1:26GC proposal goals
- 4:17New GC reference types
- 9:17Quirks compiling to GC
- 12:48GC in Grain
- 20:03Binary size and perf impact
- 23:37GC benefits and future
- 26:12Q&A
related talks
22m[Keynote] Wasm GC and the Future of High-Level Language Compilation
57mWasm GC
44mWebAssembly: the browser is now a real virtual machine
22mThe state of WebAssembly
17mImplementing and Evaluating a High-Level Language with WasmGC and the Wasm (…)
10mMobile app development with WebAssembly GC
31mWasm GC: What Exactly Is It (and Why I Should Care)
30mA Cartoon Intro to WebAssembly
