Stream: wasmtime

Topic: Heap snapshots?


view this post on Zulip Justin Fagnani (Oct 08 2026 at 15:07):

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.

view this post on Zulip fitzgen (he/him) (Oct 08 2026 at 15:24):

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

view this post on Zulip Justin Fagnani (Oct 08 2026 at 16:06):

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.

view this post on Zulip fitzgen (he/him) (Oct 08 2026 at 17:10):

I think that debugging- and profiling-focused GC heap tooling deserves its own issue, separate from that one. please file a new issue, thanks!

view this post on Zulip fitzgen (he/him) (Oct 08 2026 at 17:11):

actually -- I'll file an issue, I have some experience building this tooling, so I can note some of the details in the issue

view this post on Zulip fitzgen (he/him) (Oct 08 2026 at 17:36):

filed https://github.com/bytecodealliance/wasmtime/issues/14615

view this post on Zulip Justin Fagnani (Oct 08 2026 at 20:30):

Thanks!


Last updated: Oct 11 2026 at 02:20 UTC