Versions in this module Expand all Collapse all v0 v0.4.2 Feb 13, 2020 Changes in this version type VM + func (vm *VM) GetExportIndex(name string) (uint32, bool) + func (vm *VM) GetGlobal(index uint32) (uint64, bool) v0.4.1 Dec 25, 2019 Changes in this version + var ErrCallStackDepthExceed = errors.New("exec: call stack depth exceeded") + var ErrInvalidArgumentCount = errors.New("exec: invalid number of arguments to function") + var ErrMultipleLinearMemories = errors.New("exec: more than one linear memories in module") + var ErrOutOfBoundsMemoryAccess = errors.New("exec: out of bounds memory access") + var ErrSignatureMismatch = errors.New("exec: signature mismatch in call_indirect") + var ErrUndefinedElementIndex = errors.New("exec: undefined element index") + var ErrUnreachable = errors.New("exec: reached unreachable") + type CompiledModule struct + RawModule *wasm.Module + func CompileModule(module *wasm.Module) (*CompiledModule, error) + type Gas struct + ExecStep *uint64 + GasFactor uint64 + GasLimit *uint64 + GasPrice uint64 + LocalGasCounter uint64 + type InvalidFunctionIndexError int64 + func (e InvalidFunctionIndexError) Error() string + type InvalidReturnTypeError int8 + func (e InvalidReturnTypeError) Error() string + type Process struct + func NewProcess(vm *VM) *Process + func (proc *Process) HostData() interface{} + func (proc *Process) MemSize() int + func (proc *Process) ReadAt(p []byte, off int64) (int, error) + func (proc *Process) Terminate() + func (proc *Process) WriteAt(p []byte, off int64) (int, error) + type VM struct + CallStackDepth uint32 + ExecMetrics *Gas + HostData interface{} + MemoryLimitation uint64 + RecoverPanic bool + func NewVM(module *wasm.Module, memLimit uint64) (*VM, error) + func NewVMWithCompiled(module *CompiledModule, memLimit uint64) (*VM, error) + func (vm *VM) CheckExecLimit(costs uint64) error + func (vm *VM) ExecCode(fnIndex int64, args ...uint64) (rtrn interface{}, err error) + func (vm *VM) Memory() []byte