life icon indicating copy to clipboard operation
life copied to clipboard

Snapshotting

Open matiasinsaurralde opened this issue 6 years ago • 0 comments

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.

matiasinsaurralde avatar Dec 26 '19 14:12 matiasinsaurralde