Prepares a binary by injecting getter and setter function for memory, globals and tables.
Parameters
binaryArrayBuffer a wasm binaryincludeObject (optional, default{memory:true,table:true})include.memoryBoolean whether or not to include memory (optional, defaulttrue)include.tableBoolean whether or not to include the function table (optional, defaulttrue)include.globalsArray<Boolean> whether or not to include a given global. Each index in the array stands for a global index. Indexes that are set to false or left undefined will not be persisted. By default all globals are persisted. (optional, defaultArray.<true>)
symbolString a string used to prefix the injected setter and getter functions (optional, default'_')
Returns ArrayBuffer the resulting wasm binary
Given a Webassembly Instance this will produce an Object containing the current state of the instance
Parameters
instanceWebassembly.InstancesymbolString the symbol that will be used to find the injected functions (optional, default'_')
Returns Object the state of the wasm instance
Resumes a previously hibernated Webassembly instance
Parameters
instanceWebAssembly.InstancestateObject the previous state of the wasm instance
Returns WebAssembly.Instance