Stream: general

Topic: WASM snapshotting


view this post on Zulip Tim Ramlot (Feb 27 2022 at 23:50):

Does anyone have experience with snapshotting the state of a wasm instance, storing it to disk and resuming later? Currently, I use store.into_data() and a dump of the instance's memory; but it seems to break after some time. I'm however not sure if I'm unaware of some wasmtime constraints of just have a coding bug.

view this post on Zulip Chris Fallin (Feb 28 2022 at 17:31):

@Tim Ramlot have you seen Wizer? It takes snapshots and saves them as updated Wasm modules (with the captured memory state embedded as memory initializer segments, etc)

The WebAssembly Pre-Initializer. Contribute to bytecodealliance/wizer development by creating an account on GitHub.

view this post on Zulip Chris Fallin (Feb 28 2022 at 17:32):

(also, it uses Wasmtime under the hood, so if you're looking to build a custom solution for some other reason, it may also help work out how to do something like this)

view this post on Zulip Tim Ramlot (Mar 02 2022 at 19:04):

Thank you for your help, I based my solution roughly on Wizer. My custom runtime (based on wasmtime) contained an error. Everything seems to be working fine now. Thank you for the effort & information.


Last updated: Nov 22 2024 at 16:03 UTC