WebAssembly GC
summary
Wasm GC adds concrete heap-allocated structs, arrays, and reference types plus new bytecode ops (field.get/field.set, array access, unboxed scalars) so high-level GC languages can compile to Wasm without bundling a 100+ MB runtime. The proposal reaches stage 2 and browsers already ship partial support (Firefox uses a separate GC heap; other engines tie into the JS heap). Type-checking switched from slow equirecursive equality to recursively grouped types with explicit supertypes for linear-time checks. Go-style runtimes remain an exception.
AI-written summary · about
chapters (27)
- 0:00Introduction and disclaimer
- 1:12What is WebAssembly
- 2:17Garbage collection basics
- 3:20Challenges with GC in WebAssembly
- 4:45Goals of WebAssembly GC
- 5:51History of WebAssembly GC
- 7:17WebAssembly GC proposal status
- 8:01New type system in WebAssembly
- 10:09Why WebAssembly needs a type system
- 14:45Type systems overview
- 17:39Recursive types approaches
- 22:13Final recursive type system
- 22:57JavaScript interaction with GC
- 25:44Q&A introduction
- 26:04Dynamic vs fixed arrays in WebAssembly
- 26:24WebAssembly GC outside browsers
- 27:28Reducing app size with GC
- 28:53GC generations in browsers
- 30:18Inlining types in structures
- 31:04Feature compatibility and releases
- 32:09Memory safety in WebAssembly
- 33:14Caching GC modules
- 34:25Compiling JavaScript to WebAssembly
- 35:31Why JavaScript fits WebAssembly
- 36:37Future of GC in WebAssembly
- 37:02Memory layouts for cache efficiency
- 38:05GC limitations with Go
