Versions in this module Expand all Collapse all v0 v0.10.3 Feb 1, 2023 Changes in this version + type Instance struct + func NewInstance(module *Module, stackSize uint, heapSize uint) (*Instance, error) + func (inst *Instance) CallFunc(funcName string, argc uint32, args []uint32) error + func (inst *Instance) CallFuncV(funcName string, numResults uint32, results []interface{}, args ...interface{}) error + func (inst *Instance) Destroy() + func (inst *Instance) GetException() string + func (inst Instance) AddrAppToNative(appOffset uint32) *uint8 + func (inst Instance) AddrNativeToApp(nativePtr *uint8) uint32 + func (inst Instance) DumpCallStack() + func (inst Instance) DumpMemoryConsumption() + func (inst Instance) GetAppAddrRange(appOffset uint32) (bool, uint32, uint32) + func (inst Instance) GetNativeAddrRange(nativePtr *uint8) (bool, *uint8, *uint8) + func (inst Instance) ModuleFree(offset uint32) + func (inst Instance) ModuleMalloc(size uint32) (uint32, *uint8) + func (inst Instance) ValidateAppAddr(appOffset uint32, size uint32) bool + func (inst Instance) ValidateNativeAddr(nativePtr *uint8, size uint32) bool + func (inst Instance) ValidateStrAddr(appStrOffset uint32) bool + type LogLevel uint32 + const LogLevelDebug + const LogLevelError + const LogLevelFatal + const LogLevelVerbose + const LogLevelWarning + type Module struct + func NewModule(wasmBytes []byte) (*Module, error) + func (module *Module) Destroy() + func (module *Module) SetWasiAddrPool(addrPool [][]byte) + func (module *Module) SetWasiArgs(dirList [][]byte, mapDirList [][]byte, env [][]byte, argv [][]byte) + func (module *Module) SetWasiArgsEx(dirList [][]byte, mapDirList [][]byte, env [][]byte, argv [][]byte, ...) + func (module *Module) SetWasiNsLookupPool(nsLookupPool [][]byte) + type RuntimeSingleton struct + func Runtime() *RuntimeSingleton + func (runtime *RuntimeSingleton) Destroy() + func (runtime *RuntimeSingleton) DestroyThreadEnv() + func (runtime *RuntimeSingleton) Free(ptr *uint8) + func (runtime *RuntimeSingleton) FullInit(allocWithPool bool, heapBuf []byte, maxThreadNum uint) error + func (runtime *RuntimeSingleton) Init() error + func (runtime *RuntimeSingleton) InitThreadEnv() bool + func (runtime *RuntimeSingleton) Malloc(size uint32) *uint8 + func (runtime *RuntimeSingleton) SetLogLevel(level LogLevel) + func (runtime *RuntimeSingleton) ThreadEnvInited() bool