life
life copied to clipboard
Snapshotting
Hi, would you be able to explain the snapshotting flow?
From what I've seen it should be used as follows:
- A new VM is initialized, with a given WASM module.
- You take a snapshot with
snapshot := vm.ReadSnapshot(). - You start another VM and use
newVm.WriteSnapshot(snapshot) - The new VM should contain the same state, e.g. be able to find functions with
GetFunctionExport, etc.
Main question is, how do I start a new VM without specifying a raw WASM module (seems that exec.NewVirtualMachine always expects this)
Best.