life
life copied to clipboard
Virtual Machine Snapshots
I want to take a snapshot of the full virtual machine state so that I can restore it possibly even on another machine (in an external function that was called during the .wasm execution).
It seems necessary to only serialize the VirtualMachine struct for this, is this correct?
Only fields related to the runtime state (including CallStack, CurrentFrame, Globals, Memory, Yielded, NumValueSlots, Gas) need to be serialized. Other fields can be reconstructed from the same WebAssembly file and the same configuration.
Thank you!