Is there a way to take heap snapshots in Wasmtime?
I'm having some long GC time issues and first wanted to do a general pass to reduce allocations, but so far it seems like I have to instrument my emitted Wasm. I was looking for a way to walk the heap from Rust or something.
we don't currently have any tooling for analyzing the GC heap, unfortunately. the GC support is only very recently stable, and the full suite of support tooling you might find in a mature collector doesn't exist yet
Understood. Is there any current thinking around these kinds of features?
I went looking for issues, but the most relevant thing I found was about saving and restoring the entire execution state: https://github.com/bytecodealliance/wasmtime/issues/3017
I'd (somewhat naively) assume that heap snapshotting for profiling is a subset of state saving.
I think that debugging- and profiling-focused GC heap tooling deserves its own issue, separate from that one. please file a new issue, thanks!
actually -- I'll file an issue, I have some experience building this tooling, so I can note some of the details in the issue
filed https://github.com/bytecodealliance/wasmtime/issues/14615
Thanks!
Last updated: Oct 11 2026 at 02:20 UTC