wasp_vm v0.7.0 WaspVM View Source
Execute WebAssembly code
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Call an exported function by name from the VM. The function must have been loaded in through a module using load_file/2 or load/2 previously
Load a WebAssembly module directly from a binary into the VM
Load a binary WebAssembly file (.wasm) as a module into the VM
Starts the Virtual Machine and returns the PID which is used to interface with the VM
Returns the state for a given VM instance
Link to this section Functions
child_spec(arg) View Source
Returns a specification to start this module under a supervisor.
See Supervisor
.
execute(ref, func, args \\ []) View Source
Call an exported function by name from the VM. The function must have been loaded in through a module using load_file/2 or load/2 previously
load(ref, binary) View Source
Load a WebAssembly module directly from a binary into the VM
load_file(ref, filename) View Source
Load a binary WebAssembly file (.wasm) as a module into the VM
start()
View Source
start() :: {:ok, pid()}
start() :: {:ok, pid()}
Starts the Virtual Machine and returns the PID which is used to interface with the VM.
vm_state(ref)
View Source
vm_state(pid()) :: WaspVM
vm_state(pid()) :: WaspVM
Returns the state for a given VM instance