Files: 7d51e5a74d530f6929e58ff52e28b160b4f1d4a4 / docs / index.md
2146 bytesRaw
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Table of Contents
prepare
Prepares a binary by injecting getter and setter function for memory, globals and tables.
Parameters
binary
ArrayBuffer a wasm binaryinclude
Object (optional, default{memory:true,table:true}
)include.memory
Boolean whether or not to included memory (optional, defaulttrue
)include.table
Boolean whether or not to included the function table (optional, defaulttrue
)include.globals
Array<Boolean> whether or not to included 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>
)
symbol
String a sting used to prefix the injected setter and getter functions (optional, default'_'
)
Returns ArrayBuffer the resulting wasm binary
hibernate
Given a wasm Instance this will produce an Object containing the current state of the instance
Parameters
instance
Webassembly.Instancesymbol
String the symbol that will be used to find the injected functions (optional, default'_'
)
Returns Object the state of the wasm instance
resume
resumes a prevously hibranted webassembly instance
Parameters
instance
WebAssemby.Instancestate
Object the pervous state of the wasm instance
Built with git-ssb-web