Versions in this module Expand all Collapse all v1 v1.1.3 Apr 4, 2023 v1.1.2 Apr 4, 2023 v1.1.1 Nov 24, 2022 v1.1.0 Nov 24, 2022 Changes in this version + 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 CompileVM struct + func NewVMWithCompiled(module *CompiledModule, memLimit uint64) (*CompileVM, error) + type CompiledModule struct + RawModule *wasm.Module + func CompileModule(module *wasm.Module) (*CompiledModule, error) + type InvalidFunctionIndexError int64 + func (e InvalidFunctionIndexError) Error() string + type InvalidReturnTypeError int8 + func (e InvalidReturnTypeError) Error() string + type NativeCompilationError struct + End uint + Err error + FuncIndex int + Start uint + func (e NativeCompilationError) Error() string + type NativeCompileStats struct + NumCompiledBlocks int + Ops map[byte]*OpStats + type OpStats struct + Compiled int + Interpreted int + type Process struct + func NewProcess(vm *VM) *Process + func (proc *Process) HostCtx() 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 + MemoryLimitation uint64 + RecoverPanic bool + func NewVM(module *wasm.Module, opts ...VMOption) (*VM, error) + func (vm *VM) Abort() bool + func (vm *VM) Close() error + func (vm *VM) CompileStats() NativeCompileStats + func (vm *VM) ExecCode(fnIndex int64, args ...uint64) (rtrn interface{}, err error) + func (vm *VM) HostCtx() interface{} + func (vm *VM) Memory() []byte + func (vm *VM) Restart() + func (vm *VM) SetHostCtx(ctx interface{}) + func (vm *VM) SetUseGas(useGas func(byte)) + type VMOption func(c *config) + func EnableAOT(v bool) VMOption