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.
@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)
(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)
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