---
title: "GC and Exceptions in Wasmtime"
description: "Wasmtime 47 enables the WebAssembly GC and exceptions proposals by default, letting objects-and-references languages use the runtime's collector instead of shipping their own, and letting exception-using languages use zero-overhead unwinding instead of custom return-flag calling conventions."
url: "https://swe.quest/articles/gc-and-exceptions-in-wasmtime-0760e599cf5cc079"
canonical: "https://bytecodealliance.org/articles/wasmtime-gc"
source: "Bytecode Alliance"
published: "2026-07-20"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["webassembly","memory-management","runtimes","compilers"]
---

# GC and Exceptions in Wasmtime

A post on [Bytecode Alliance](https://swe.quest/sources/bytecode-alliance.md), published 2026-07-20, 5 min read, Announcement. Original: [https://bytecodealliance.org/articles/wasmtime-gc](https://bytecodealliance.org/articles/wasmtime-gc)

## Summary

Wasmtime 47 enables the WebAssembly GC and exceptions proposals by default, letting objects-and-references languages use the runtime's collector instead of shipping their own, and letting exception-using languages use zero-overhead unwinding instead of custom return-flag calling conventions. Wasmtime's collector is a Cheney-style semi-space copying GC with bump allocation and no read/write barriers, built on top of a Wasm linear memory with 32-bit indices as references. That choice gives sandbox defense-in-depth against collector bugs, guard-page bounds-check elision, compact references, preserved 5µs pooled instantiation and portability. Correctness was hardened with GC support in wasm-smith plus two targeted fuzzers, but throughput and latency are not yet competitive with V8 or SpiderMonkey because the design targets many short-lived instances. Upcoming work covers GC-type-aware alias analysis and component model integration via lazy value lowering.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)

## Prerequisites

- WebAssembly basics ([easy posts on WebAssembly](https://swe.quest/tags/webassembly.md?difficulty=easy))
- garbage collection concepts ([easy posts on Memory management](https://swe.quest/tags/memory-management.md?difficulty=easy))

## Keywords

Wasmtime, Wasm GC, Wasm exceptions, wasm-smith, Cheney collector, component model

## Related posts

- [A new way to bring garbage collected programming languages efficiently to WebAssembly · V8](https://swe.quest/articles/a-new-way-to-bring-garbage-collected-programming-languages-efficiently-to-667c409700cf29b4.md): V8 · 2023-11-01 · Hard · 20 min read · WebAssembly, Memory management, Runtimes & VMs, Compilers
  Garbage-collected languages like Java, Kotlin, Dart, Python and C# can reach WebAssembly in two ways: compile an existing language VM to linear-memory WasmMVP, or lower the language's objects onto WasmGC structs and arrays managed by the host VM's garbage collector.
- [Extensible Language Support in Zed - Part 1](https://swe.quest/articles/extensible-language-support-in-zed-part-1-13bc037c6f5096a9.md): Zed · 2024-04-18 · Medium · 7 min read · WebAssembly, Developer tools, Sandboxing & isolation, Compilers, Rust
  Zed loads third-party Tree-sitter grammars as WebAssembly modules using a hybrid design.
- [Introducing the JetStream 3 Benchmark Suite](https://swe.quest/articles/introducing-the-jetstream-3-benchmark-suite-df1c85fb12e2a75d.md): WebKit · 2026-03-31 · Hard · 21 min read · Runtimes & VMs, WebAssembly, Compilers, Memory management, Performance engineering
  JetStream 3 replaces JetStream 2's separate Wasm Startup/Runtime scores with the JavaScript-style first-iteration, worst-case and average-case scoring.
- [Contributing support for a Wasm instruction to Winch](https://swe.quest/articles/contributing-support-for-a-wasm-instruction-to-winch-3a4d14391ef1d680.md): Shopify Engineering · 2023-07-18 · Hard · 9 min read · WebAssembly, Compilers, Rust, Testing, Open source
  Adding a WebAssembly instruction to Winch, Wasmtime's baseline non-optimizing compiler, touches several layers: the wasmparser VisitOperator visitor, the CodeGenContext that manages the value stack, register allocation and spilling, an ISA-independent MacroAssembler, and an x86\_64 assembler built on Cranelift's ISLE-generated instruction definitions.
- [WebAssembly and Back Again: Fine-Grained Sandboxing in Firefox 95](https://swe.quest/articles/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95-d23a4c9673130b46.md): Mozilla Hacks · 2021-12-06 · Medium · 4 min read · Sandboxing & isolation, WebAssembly, Browsers, Memory safety, Supply chain security
  Firefox 95 ships RLBox, a fine-grained sandboxing technique that compiles third-party C/C++ libraries (Graphite, Hunspell, Ogg, with Expat and Woff2 following in 96) to WebAssembly and then back to native code, so untrusted code runs in-process but cannot jump to unexpected code or touch memory outside its region.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
