package wasm

Import Path
	github.com/tetratelabs/wazero/internal/wasm (on go.dev)

Dependency Relation
	imports 27 packages, and imported by 6 packages


Package-Level Type Names (total 44)
/* sort by: | */
Code is an entry in the Module.CodeSection containing the locals and body of the function. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-code Body is a sequence of expressions ending in OpcodeEnd See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-expr BodyOffsetInCodeSection is the offset of the beginning of the body in the code section. This is used for DWARF based stack trace where a program counter represents an offset in code section. GoFunc is non-nil when IsHostFunction and defined in go, either api.GoFunction or api.GoModuleFunction. When present, LocalTypes and Body must be nil. Note: This has no serialization format, so is not encodable. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#host-functions%E2%91%A2 LocalTypes are any function-scoped variables in insertion order. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-local func MustParseGoReflectFuncCode(fn interface{}) Code
Data []byte Opcode Opcode
CustomSection contains the name and raw data of a custom section. Data []byte Name string
DataInstance holds bytes corresponding to the data segment in a module. https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/exec/runtime.html#data-instances
Init []byte OffsetExpression ConstantExpression Passive bool IsPassive returns true if this data segment is "passive" in the sense that memory offset and index is determined at runtime and used by OpcodeMemoryInitName instruction in the bulk memory operations proposal. See https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/appendix/changes.html#bulk-memory-and-table-instructions
ElementInstance represents an element instance in a module. See https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/exec/runtime.html#element-instances
ElementMode represents a mode of element segment which is either active, passive or declarative. https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/syntax/modules.html#element-segments
ElementSegment are initialization instructions for a TableInstance See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#syntax-elem Init indices are (nullable) table elements where each index is the function index by which the module initialize the table. Mode is the mode of this element segment. OffsetExpr returns the table element offset to apply to Init indices. Note: This can be validated prior to instantiation unless it includes OpcodeGlobalGet (an imported global). TableIndex is the table's index to which this element segment is applied. Note: This is used if and only if the Mode is active. Type holds the type of this element segment, which is the RefType in WebAssembly 2.0. IsActive returns true if the element segment is "active" mode which requires the runtime to initialize table with the contents in .Init field.
Engine is a Store-scoped mechanism to compile functions declared or imported by a module. This is a top-level type implemented by an interpreter or compiler. Close closes this engine, and releases all the compiled cache. CompileModule implements the same method as documented on wasm.Engine. CompiledModuleCount is exported for testing, to track the size of the compilation cache. DeleteCompiledModule releases compilation caches for the given module (source). Note: it is safe to call this function for a module from which module instances are instantiated even when these module instances have outstanding calls. NewModuleEngine compiles down the function instances in a module, and returns ModuleEngine for the module. * module is the source module from which moduleFunctions are instantiated. This is used for caching. * instance is the *ModuleInstance which is created from `module`. Note: Input parameters must be pre-validated with wasm.Module Validate, to ensure no fields are invalid due to reasons such as out-of-bounds. Engine : github.com/prometheus/common/expfmt.Closer Engine : io.Closer func github.com/tetratelabs/wazero/internal/engine/interpreter.NewEngine(_ context.Context, enabledFeatures api.CoreFeatures, _ filecache.Cache) Engine func github.com/tetratelabs/wazero/internal/engine/wazevo.NewEngine(ctx context.Context, _ api.CoreFeatures, fc filecache.Cache) Engine func NewStore(enabledFeatures api.CoreFeatures, engine Engine) *Store
Export is the binary representation of an export indicated by Type See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-export Index is the index of the definition to export, the index is by Type e.g. If ExternTypeFunc, this is a position in the function index. Name is what the host refers to this definition as. Type ExternType
ExternType is an alias of api.ExternType defined to simplify imports.
FunctionDefinition implements api.FunctionDefinition Debugname is exported for testing purpose. Functype is exported for testing purpose. WazeroOnlyType internalapi.WazeroOnlyType DebugName implements the same method as documented on api.FunctionDefinition. ExportNames implements the same method as documented on api.FunctionDefinition. GoFunction implements the same method as documented on api.FunctionDefinition. Import implements the same method as documented on api.FunctionDefinition. Index implements the same method as documented on api.FunctionDefinition. ModuleName implements the same method as documented on api.FunctionDefinition. Name implements the same method as documented on api.FunctionDefinition. ParamNames implements the same method as documented on api.FunctionDefinition. ParamTypes implements api.FunctionDefinition ParamTypes. ResultNames implements the same method as documented on api.FunctionDefinition. ResultTypes implements api.FunctionDefinition ResultTypes. FunctionDefinition : github.com/tetratelabs/wazero/internal/internalapi.WazeroOnly *FunctionDefinition : github.com/tetratelabs/wazero/api.ExportDefinition *FunctionDefinition : github.com/tetratelabs/wazero/api.FunctionDefinition *FunctionDefinition : github.com/polarsignals/frostdb/query/logicalplan.Named func (*Module).FunctionDefinition(index Index) *FunctionDefinition
FunctionType is a possibly empty function signature. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#function-types%E2%91%A0 ParamNumInUint64 is the number of uint64 values requires to represent the Wasm param type. Params are the possibly empty sequence of value types accepted by a function with this signature. ResultsNumInUint64 is the number of uint64 values requires to represent the Wasm result type. Results are the possibly empty sequence of value types returned by a function with this signature. Note: In WebAssembly 1.0 (20191205), there can be at most one result. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#result-types%E2%91%A0 (*FunctionType) CacheNumInUint64() EqualsSignature returns true if the function type has the same parameters and results. String implements fmt.Stringer. *FunctionType : expvar.Var *FunctionType : fmt.Stringer func DecodeBlockType(types []FunctionType, r *bytes.Reader, enabledFeatures api.CoreFeatures) (*FunctionType, uint64, error) func DecodeBlockType(types []FunctionType, r *bytes.Reader, enabledFeatures api.CoreFeatures) (*FunctionType, uint64, error) func SplitCallStack(ft *FunctionType, stack []uint64) (params []uint64, results []uint64, err error) func (*ModuleInstance).GetFunctionTypeID(t *FunctionType) FunctionTypeID func (*Store).GetFunctionTypeID(t *FunctionType) (FunctionTypeID, error) func (*Store).GetFunctionTypeIDs(ts []FunctionType) ([]FunctionTypeID, error) func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.SignatureForListener(wasmSig *FunctionType) (*ssa.Signature, *ssa.Signature) func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.SignatureForWasmFunctionType(typ *FunctionType) ssa.Signature func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.(*Compiler).Init(idx, typIndex Index, typ *FunctionType, localTypes []ValueType, body []byte, needListener bool, bodyOffsetInCodeSection uint64)
FunctionTypeID is a uniquely assigned integer for a function type. This is wazero specific runtime object and specific to a store, and used at runtime to do type-checks on indirect function calls. func (*ModuleInstance).GetFunctionTypeID(t *FunctionType) FunctionTypeID func (*Store).GetFunctionTypeID(t *FunctionType) (FunctionTypeID, error) func (*Store).GetFunctionTypeIDs(ts []FunctionType) ([]FunctionTypeID, error) func ModuleEngine.LookupFunction(t *TableInstance, typeId FunctionTypeID, tableOffset Index) (*ModuleInstance, Index) func (*ModuleInstance).LookupFunction(t *TableInstance, typeId FunctionTypeID, tableOffset Index) api.Function func (*Store).Instantiate(ctx context.Context, module *Module, name string, sys *internalsys.Context, typeIDs []FunctionTypeID) (*ModuleInstance, error)
Init ConstantExpression Type GlobalType
GlobalInstance represents a global instance in a store. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#global-instances%E2%91%A0 Index Index Me is the module engine that owns this global instance. The .Val and .ValHi fields are only valid when me is nil. If me is non-nil, the value is stored in the module engine. Type GlobalType Val holds a 64-bit representation of the actual value. If me is non-nil, the value will not be updated and the current value is stored in the module engine. ValHi is only used for vector type globals, and holds the higher bits of the vector. If me is non-nil, the value will not be updated and the current value is stored in the module engine. (*GlobalInstance) SetValue(lo, hi uint64) String implements api.Global. (*GlobalInstance) Value() (uint64, uint64) *GlobalInstance : expvar.Var *GlobalInstance : fmt.Stringer
Mutable bool ValType ValueType func (*Module).AllDeclarations() (functions []Index, globals []GlobalType, memory *Memory, tables []Table, err error)
HostFunc is a function with an inlined type, used for NewHostModule. Any corresponding FunctionType will be reused or added to the Module. Code is the equivalent function in the SectionIDCode. ExportName is the only value returned by api.FunctionDefinition. Name is equivalent to the same method on api.FunctionDefinition. ParamNames is equivalent to the same method on api.FunctionDefinition. ParamTypes is equivalent to the same method on api.FunctionDefinition. ResultNames is equivalent to the same method on api.FunctionDefinition. ResultTypes is equivalent to the same method on api.FunctionDefinition. WithGoModuleFunc returns a copy of the function, replacing its Code.GoFunc. func (*HostFunc).WithGoModuleFunc(fn api.GoModuleFunc) *HostFunc func NewHostModule(moduleName string, exportNames []string, nameToHostFunc map[string]*HostFunc, enabledFeatures api.CoreFeatures) (m *Module, err error) func HostFuncExporter.ExportHostFunc(*HostFunc)
( HostFuncExporter) ExportHostFunc(*HostFunc)
Import is the binary representation of an import indicated by Type See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-import DescFunc is the index in Module.TypeSection when Type equals ExternTypeFunc DescGlobal is the inlined GlobalType when Type equals ExternTypeGlobal DescMem is the inlined Memory when Type equals ExternTypeMemory DescTable is the inlined Table when Type equals ExternTypeTable IndexPerType has the index of this import per ExternType. Module is the possibly empty primary namespace of this import Module is the possibly empty secondary namespace of this import Type ExternType
Index is the offset in an index, not necessarily an absolute position in a Module section. This is because indexs are often preceded by a corresponding type in the Module.ImportSection. For example, the function index starts with any ExternTypeFunc in the Module.ImportSection followed by the Module.FunctionSection See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-index
IndirectNameMap associates an index with an association of names. Note: IndirectNameMap is unique by NameMapAssoc.Index, but NameMapAssoc.NameMap needn't be unique. Note: When encoding in the Binary format, this must be ordered by NameMapAssoc.Index https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-indirectnamemap
Memory describes the limits of pages (64KB) in a memory. Cap uint32 IsMaxEncoded true if the Max is encoded in the original binary. IsShared true if the memory is shared for access from multiple agents. Max uint32 Min uint32 Validate ensures values assigned to Min, Cap and Max are within valid thresholds. func (*Module).AllDeclarations() (functions []Index, globals []GlobalType, memory *Memory, tables []Table, err error) func NewMemoryInstance(memSec *Memory, allocator experimental.MemoryAllocator, moduleEngine ModuleEngine) *MemoryInstance
MemoryDefinition implements api.MemoryDefinition WazeroOnlyType internalapi.WazeroOnlyType ExportNames implements the same method as documented on api.MemoryDefinition. Import implements the same method as documented on api.MemoryDefinition. Index implements the same method as documented on api.MemoryDefinition. Max implements the same method as documented on api.MemoryDefinition. Min implements the same method as documented on api.MemoryDefinition. ModuleName implements the same method as documented on api.MemoryDefinition. MemoryDefinition : github.com/tetratelabs/wazero/internal/internalapi.WazeroOnly *MemoryDefinition : github.com/tetratelabs/wazero/api.ExportDefinition *MemoryDefinition : github.com/tetratelabs/wazero/api.MemoryDefinition
MemoryInstance represents a memory instance in a store, and implements api.Memory. Note: In WebAssembly 1.0 (20191205), there may be up to one Memory per store, which means the precise memory is always wasm.Store Memories index zero: `store.Memories[0]` See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#memory-instances%E2%91%A0. Buffer []byte Cap uint32 Max uint32 Min uint32 Mux is used in interpreter mode to prevent overlapping calls to atomic instructions, introduced with WebAssembly threads proposal, and in compiler mode to make memory modifications within Grow non-racy for the Go race detector. Shared bool WazeroOnlyType internalapi.WazeroOnlyType Definition implements the same method as documented on api.Memory. Grow implements the same method as documented on api.Memory. Notify wakes up at most count waiters at the given offset. Pages implements the same method as documented on api.Memory. Read implements the same method as documented on api.Memory. ReadByte implements the same method as documented on api.Memory. ReadFloat32Le implements the same method as documented on api.Memory. ReadFloat64Le implements the same method as documented on api.Memory. ReadUint16Le implements the same method as documented on api.Memory. ReadUint32Le implements the same method as documented on api.Memory. ReadUint64Le implements the same method as documented on api.Memory. Size implements the same method as documented on api.Memory. Wait32 suspends the caller until the offset is notified by a different agent. Wait64 suspends the caller until the offset is notified by a different agent. Write implements the same method as documented on api.Memory. WriteByte implements the same method as documented on api.Memory. WriteFloat32Le implements the same method as documented on api.Memory. WriteFloat64Le implements the same method as documented on api.Memory. WriteString implements the same method as documented on api.Memory. WriteUint16Le implements the same method as documented on api.Memory. WriteUint32Le implements the same method as documented on api.Memory. WriteUint64Le implements the same method as documented on api.Memory. MemoryInstance : github.com/tetratelabs/wazero/internal/internalapi.WazeroOnly *MemoryInstance : github.com/tetratelabs/wazero/api.Memory func NewMemoryInstance(memSec *Memory, allocator experimental.MemoryAllocator, moduleEngine ModuleEngine) *MemoryInstance
Module is a WebAssembly binary representation. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#modules%E2%91%A8 Differences from the specification: * NameSection is the only key ("name") decoded from the SectionIDCustom. * ExportSection is represented as a map for lookup convenience. * Code.GoFunc is contains any go `func`. It may be present when Code.Body is not. CodeSection is index-correlated with FunctionSection and contains each function's locals and body. When present, the HostFunctionSection of the same index must be nil. Note: In the Binary Format, this is SectionIDCode. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#code-section%E2%91%A0 CustomSections are set when the SectionIDCustom other than "name" were successfully decoded from the binary format. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#custom-section%E2%91%A0 DWARFLines is used to emit DWARF based stack trace. This is created from the multiple custom sections as described in https://yurydelendik.github.io/webassembly-dwarf/, though it is not specified in the Wasm specification: https://github.com/WebAssembly/debugging/issues/1 DataCountSection is the optional section and holds the number of data segments in the data section. Note: This may exist in WebAssembly 2.0 or WebAssembly 1.0 with CoreFeatureBulkMemoryOperations. See https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/binary/modules.html#data-count-section See https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/appendix/changes.html#bulk-memory-and-table-instructions Note: In the Binary Format, this is SectionIDData. Note: In the Binary Format, this is SectionIDElement. ExportSection contains each export defined in this module. Note: In the Binary Format, this is SectionIDExport. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#exports%E2%91%A0 Exports maps a name to Export, and is convenient for fast look up of exported instances at runtime. Each item of this map points to an element of ExportSection. FunctionDefinitionSection is a wazero-specific section. FunctionSection contains the index in TypeSection of each function defined in this module. Note: The function Index space begins with imported functions and ends with those defined in this module. For example, if there are two imported functions and one defined in this module, the function Index 3 is defined in this module at FunctionSection[0]. Note: FunctionSection is index correlated with the CodeSection. If given the same position, e.g. 2, a function type is at TypeSection[FunctionSection[2]], while its locals and body are at CodeSection[2]. Note: In the Binary Format, this is SectionIDFunction. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#function-section%E2%91%A0 GlobalSection contains each global defined in this module. Global indexes are offset by any imported globals because the global index begins with imports, followed by ones defined in this module. For example, if there are two imported globals and three defined in this module, the global at index 3 is defined in this module at GlobalSection[0]. Note: In the Binary Format, this is SectionIDGlobal. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#global-section%E2%91%A0 ID is the sha256 value of the source wasm plus the configurations which affect the runtime representation of Wasm binary. This is only used for caching. ImportFunctionCount ImportGlobalCount ImportMemoryCount, and ImportTableCount are the cached import count per ExternType set during decoding. ImportFunctionCount ImportGlobalCount ImportMemoryCount, and ImportTableCount are the cached import count per ExternType set during decoding. ImportFunctionCount ImportGlobalCount ImportMemoryCount, and ImportTableCount are the cached import count per ExternType set during decoding. ImportPerModule maps a module name to the list of Import to be imported from the module. This is used to do fast import resolution during instantiation. ImportSection contains imported functions, tables, memories or globals required for instantiation (Store.Instantiate). Note: there are no unique constraints relating to the two-level namespace of Import.Module and Import.Name. Note: In the Binary Format, this is SectionIDImport. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#import-section%E2%91%A0 ImportFunctionCount ImportGlobalCount ImportMemoryCount, and ImportTableCount are the cached import count per ExternType set during decoding. IsHostModule true if this is the host module, false otherwise. MemoryDefinitionSection is a wazero-specific section. MemorySection contains each memory defined in this module. Note: The memory Index space begins with imported memories and ends with those defined in this module. For example, if there are two imported memories and one defined in this module, the memory Index 3 is defined in this module at TableSection[0]. Note: Version 1.0 (20191205) of the WebAssembly spec allows at most one memory definition per module, so the length of the MemorySection can be zero or one, and can only be one if there is no imported memory. Note: In the Binary Format, this is SectionIDMemory. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#memory-section%E2%91%A0 NameSection is set when the SectionIDCustom "name" was successfully decoded from the binary format. Note: This is the only SectionIDCustom defined in the WebAssembly 1.0 (20191205) Binary Format. Others are skipped as they are not used in wazero. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#name-section%E2%91%A0 See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#custom-section%E2%91%A0 StartSection is the index of a function to call before returning from Store.Instantiate. Note: The index here is not the position in the FunctionSection, rather in the function index, which begins with imported functions. Note: In the Binary Format, this is SectionIDStart. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#start-section%E2%91%A0 TableSection contains each table defined in this module. Note: The table Index space begins with imported tables and ends with those defined in this module. For example, if there are two imported tables and one defined in this module, the table Index 3 is defined in this module at TableSection[0]. Note: Version 1.0 (20191205) of the WebAssembly spec allows at most one table definition per module, so the length of the TableSection can be zero or one, and can only be one if there is no imported table. Note: In the Binary Format, this is SectionIDTable. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#table-section%E2%91%A0 TypeSection contains the unique FunctionType of functions imported or defined in this module. Note: Currently, there is no type ambiguity in the index as WebAssembly 1.0 only defines function type. In the future, other types may be introduced to support CoreFeatures such as module linking. Note: In the Binary Format, this is SectionIDType. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#types%E2%91%A0%E2%91%A0 AllDeclarations returns all declarations for functions, globals, memories and tables in a module including imported ones. AssignModuleID calculates a sha256 checksum on `wasm` and other args, and set Module.ID to the result. See the doc on Module.ID on what it's used for. BuildMemoryDefinitions generates memory metadata that can be parsed from the module. This must be called after all validation. Note: This is exported for wazero.Runtime `CompileModule`. ExportedFunctions returns the definitions of each exported function. ExportedMemories implements the same method as documented on wazero.CompiledModule. FunctionDefinition returns the FunctionDefinition for the given `index`. ImportedFunctions returns the definitions of each imported function. Note: Unlike ExportedFunctions, there is no unique constraint on imports. ImportedMemories implements the same method as documented on wazero.CompiledModule. SectionElementCount returns the count of elements in a given section ID For example... * SectionIDType returns the count of FunctionType * SectionIDCustom returns the count of CustomSections plus one if NameSection is present * SectionIDHostFunction returns the count of HostFunctionSection * SectionIDExport returns the count of unique export names (*Module) Validate(enabledFeatures api.CoreFeatures) error func NewHostModule(moduleName string, exportNames []string, nameToHostFunc map[string]*HostFunc, enabledFeatures api.CoreFeatures) (m *Module, err error) func github.com/tetratelabs/wazero/internal/wasm/binary.DecodeModule(binary []byte, enabledFeatures api.CoreFeatures, memoryLimitPages uint32, memoryCapacityFromMax, dwarfEnabled, storeCustomSections bool) (*Module, error) func Engine.CompileModule(ctx context.Context, module *Module, listeners []experimental.FunctionListener, ensureTermination bool) error func Engine.DeleteCompiledModule(module *Module) func Engine.NewModuleEngine(module *Module, instance *ModuleInstance) (ModuleEngine, error) func (*Store).Instantiate(ctx context.Context, module *Module, name string, sys *internalsys.Context, typeIDs []FunctionTypeID) (*ModuleInstance, error) func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.NewFrontendCompiler(m *Module, ssaBuilder ssa.Builder, offset *wazevoapi.ModuleContextOffsetData, ensureTermination bool, listenerOn bool, sourceInfo bool) *frontend.Compiler func github.com/tetratelabs/wazero/internal/engine/wazevo/wazevoapi.NewModuleContextOffsetData(m *Module, withListener bool) wazevoapi.ModuleContextOffsetData
ModuleEngine implements function calls for a given module. DoneInstantiation is called at the end of the instantiation of the module. FunctionInstanceReference returns Reference for the given Index for a FunctionInstance. The returned values are used by the initialization via ElementSegment. GetGlobalValue returns the value of the global variable at the given Index. Only called when OwnsGlobals() returns true, and must not be called for imported globals LookupFunction returns the FunctionModule and the Index of the function in the returned ModuleInstance at the given offset in the table. MemoryGrown notifies the engine that the memory has grown. NewFunction returns an api.Function for the given function pointed by the given Index. OwnsGlobals returns true if this ModuleEngine owns the global variables. If true, wasm.GlobalInstance's Val,ValHi should not be accessed directly. ResolveImportedFunction is used to add imported functions needed to make this ModuleEngine fully functional. - `index` is the function Index of this imported function. - `descFunc` is the type Index in Module.TypeSection of this imported function. It corresponds to Import.DescFunc. - `indexInImportedModule` is the function Index of the imported function in the imported module. - `importedModuleEngine` is the ModuleEngine for the imported ModuleInstance. ResolveImportedMemory is called when this module imports a memory from another module. SetGlobalValue sets the value of the global variable at the given Index. Only called when OwnsGlobals() returns true, and must not be called for imported globals func Engine.NewModuleEngine(module *Module, instance *ModuleInstance) (ModuleEngine, error) func NewMemoryInstance(memSec *Memory, allocator experimental.MemoryAllocator, moduleEngine ModuleEngine) *MemoryInstance func ModuleEngine.ResolveImportedFunction(index, descFunc, indexInImportedModule Index, importedModuleEngine ModuleEngine) func ModuleEngine.ResolveImportedMemory(importedModuleEngine ModuleEngine)
ModuleID represents sha256 hash value uniquely assigned to Module.
ModuleInstance represents instantiated wasm module. The difference from the spec is that in wazero, a ModuleInstance holds pointers to the instances, rather than "addresses" (i.e. index to Store.Functions, Globals, etc) for convenience. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#syntax-moduleinst This implements api.Module. CloseNotifier is an experimental hook called once on close. Closed is used both to guard moduleEngine.CloseWithExitCode and to store the exit code. The update value is closedType + exitCode << 32. This ensures an exit code of zero isn't mistaken for never closed. Note: Exclusively reading and updating this with atomics guarantees cross-goroutine observations. See /RATIONALE.md CodeCloser is non-nil when the code should be closed after this module. DataInstances holds data segments bytes of the module. This is only used by bulk memory operations. https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/exec/runtime.html#data-instances ElementInstances holds the element instance, and each holds the references to either functions or external objects (unimplemented). Engine implements function calls for this module. Exports map[string]*Export Globals []*GlobalInstance MemoryInstance *MemoryInstance ModuleName string Source is a pointer to the Module from which this ModuleInstance derives. Sys is exposed for use in special imports such as WASI, assemblyscript. # Notes - This is a part of ModuleInstance so that scope and Close is coherent. - This is not exposed outside this repository (as a host function parameter) because we haven't thought through capabilities based security implications. Tables []*TableInstance TypeIDs is index-correlated with types and holds typeIDs which is uniquely assigned to a type by store. This is necessary to achieve fast runtime type checking for indirect function calls at runtime. WazeroOnlyType internalapi.WazeroOnlyType Close implements the same method as documented on api.Module. CloseModuleOnCanceledOrTimeout take a context `ctx`, which might be a Cancel or Timeout context, and spawns the Goroutine to check the context is canceled ot deadline exceeded. If it reaches one of the conditions, it sets the appropriate exit code. Callers of this function must invoke the returned context.CancelFunc to release the spawned Goroutine. CloseWithCtxErr closes the module with an exit code based on the type of error reported by the context. If the context's error is unknown or nil, the module does not close. CloseWithExitCode implements the same method as documented on api.Module. ExportedFunction implements the same method as documented on api.Module. ExportedFunctionDefinitions implements the same method as documented on api.Module. ExportedGlobal implements the same method as documented on api.Module. ExportedMemory implements the same method as documented on api.Module. ExportedMemoryDefinitions implements the same method as documented on api.Module. FailIfClosed returns a sys.ExitError if CloseWithExitCode was called. GetFunctionTypeID is used by emscripten. Global implements experimental.InternalModule. GlobalVal is an internal hack to get the lower 64 bits of a global. IsClosed implements the same method as documented on api.Module. LookupFunction looks up the table by the given index, and returns the api.Function implementation if found, otherwise this panics according to the same semantics as call_indirect instruction. Currently, this is only used by emscripten which needs to do call_indirect-like operation in the host function. Memory implements the same method as documented on api.Module. Name implements the same method as documented on api.Module NumGlobal implements experimental.InternalModule. String implements the same method as documented on api.Module ModuleInstance : github.com/tetratelabs/wazero/internal/internalapi.WazeroOnly *ModuleInstance : github.com/tetratelabs/wazero.CompilationCache *ModuleInstance : github.com/tetratelabs/wazero/api.Closer *ModuleInstance : github.com/tetratelabs/wazero/api.Module *ModuleInstance : github.com/tetratelabs/wazero/experimental.InternalModule *ModuleInstance : github.com/polarsignals/frostdb/query/logicalplan.Named *ModuleInstance : expvar.Var *ModuleInstance : fmt.Stringer func ModuleEngine.LookupFunction(t *TableInstance, typeId FunctionTypeID, tableOffset Index) (*ModuleInstance, Index) func (*Store).Instantiate(ctx context.Context, module *Module, name string, sys *internalsys.Context, typeIDs []FunctionTypeID) (*ModuleInstance, error) func (*Store).Module(moduleName string) *ModuleInstance func Engine.NewModuleEngine(module *Module, instance *ModuleInstance) (ModuleEngine, error)
Index Index Name string
NameMap associates an index with any associated names. Note: Often the index bridges multiple sections. For example, the function index starts with any ExternTypeFunc in the Module.ImportSection followed by the Module.FunctionSection Note: NameMap is unique by NameAssoc.Index, but NameAssoc.Name needn't be unique. Note: When encoding in the Binary format, this must be ordered by NameAssoc.Index See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-namemap
Index Index NameMap NameMap
NameSection represent the known custom name subsections defined in the WebAssembly Binary Format Note: This can be nil if no names were decoded for any reason including configuration. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#name-section%E2%91%A0 FunctionNames is an association of a function index to its symbolic identifier. e.g. add * the key (idx) is in the function index, where module defined functions are preceded by imported ones. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#functions%E2%91%A7 For example, assuming the below text format is the second import, you would expect FunctionNames[1] = "mul" (import "Math" "Mul" (func $mul (param $x f32) (param $y f32) (result f32))) Note: FunctionNames are only used for debugging. At runtime, functions are called based on raw numeric index. Note: This can be nil for any reason including configuration. LocalNames contains symbolic names for function parameters or locals that have one. Note: In the Text Format, function local names can inherit parameter names from their type. Here are some examples: * (module (import (func (param $x i32) (param i32))) (func (type 0))) = [{0, {x,0}}] * (module (import (func (param i32) (param $y i32))) (func (type 0) (local $z i32))) = [0, [{y,1},{z,2}]] * (module (func (param $x i32) (local $y i32) (local $z i32))) = [{x,0},{y,1},{z,2}] Note: LocalNames are only used for debugging. At runtime, locals are called based on raw numeric index. Note: This can be nil for any reason including configuration. ModuleName is the symbolic identifier for a module. e.g. math Note: This can be empty for any reason including configuration. ResultNames is a wazero-specific mechanism to store result names.
Opcode is the binary Opcode of an instruction. See also InstructionName
OpcodeAtomic represents an opcode of atomic instructions which has multi-byte encoding and is prefixed by OpcodeAtomicPrefix. These opcodes are toggled with CoreFeaturesThreads.
OpcodeMisc represents opcodes of the miscellaneous operations. Such an operations has multi-byte encoding which is prefixed by OpcodeMiscPrefix.
OpcodeVec represents an opcode of a vector instructions which has multi-byte encoding and is prefixed by OpcodeMiscPrefix. These opcodes are toggled with CoreFeatureSIMD.
Reference is the runtime representation of RefType which is either RefTypeFuncref or RefTypeExternref.
RefType is either RefTypeFuncref or RefTypeExternref as of WebAssembly core 2.0.
SectionID identifies the sections of a Module in the WebAssembly 1.0 (20191205) Binary Format. Note: these are defined in the wasm package, instead of the binary package, as a key per section is needed regardless of format, and deferring to the binary type avoids confusion. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#sections%E2%91%A0
Store is the runtime representation of "instantiated" Wasm module and objects. Multiple modules can be instantiated within a single store, and each instance, (e.g. function instance) can be referenced by other module instances in a Store via Module.ImportSection. Every type whose name ends with "Instance" suffix belongs to exactly one store. Note that store is not thread (concurrency) safe, meaning that using single Store via multiple goroutines might result in race conditions. In that case, the invocation and access to any methods and field of Store must be guarded by mutex. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#store%E2%91%A0 EnabledFeatures are read-only to allow optimizations. Engine is a global context for a Store which is in responsible for compilation and execution of Wasm modules. CloseWithExitCode implements the same method as documented on wazero.Runtime. (*Store) GetFunctionTypeID(t *FunctionType) (FunctionTypeID, error) (*Store) GetFunctionTypeIDs(ts []FunctionType) ([]FunctionTypeID, error) Instantiate uses name instead of the Module.NameSection ModuleName as it allows instantiating the same module under different names safely and concurrently. * ctx: the default context used for function calls. * name: the name of the module. * sys: the system context, which will be closed (SysContext.Close) on ModuleInstance.Close. Note: Module.Validate must be called prior to instantiation. Module implements wazero.Runtime Module func NewStore(enabledFeatures api.CoreFeatures, engine Engine) *Store
Table describes the limits of elements and its type in a table. Max *uint32 Min uint32 Type RefType func (*Module).AllDeclarations() (functions []Index, globals []GlobalType, memory *Memory, tables []Table, err error)
TableInstance represents a table of (RefTypeFuncref) elements in a module. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#table-instances%E2%91%A0 Max if present is the maximum (function) elements in this table, or nil if unbounded. Min is the minimum (function) elements in this table and cannot grow to accommodate ElementSegment. References holds references whose type is either RefTypeFuncref or RefTypeExternref (unsupported). Currently, only function references are supported. Type is either RefTypeFuncref or RefTypeExternRef. Grow appends the `initialRef` by `delta` times into the References slice. Returns -1 if the operation is not valid, otherwise the old length of the table. https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/exec/instructions.html#xref-syntax-instructions-syntax-instr-table-mathsf-table-grow-x func ModuleEngine.LookupFunction(t *TableInstance, typeId FunctionTypeID, tableOffset Index) (*ModuleInstance, Index) func (*ModuleInstance).LookupFunction(t *TableInstance, typeId FunctionTypeID, tableOffset Index) api.Function
ValueType is an alias of api.ValueType defined to simplify imports.
Package-Level Functions (total 17)
AtomicInstructionName returns the instruction name corresponding to the atomic Opcode.
DecodeBlockType decodes the type index from a positive 33-bit signed integer. Negative numbers indicate up to one WebAssembly 1.0 (20191205) compatible result type. Positive numbers are decoded when `enabledFeatures` include CoreFeatureMultiValue and include an index in the Module.TypeSection. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#binary-blocktype See https://github.com/WebAssembly/spec/blob/wg-2.0.draft1/proposals/multi-value/Overview.md
ExternTypeName is an alias of api.ExternTypeName defined to simplify imports.
InstructionName returns the instruction corresponding to this binary Opcode. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#a7-index-of-instructions
MemoryPagesToBytesNum converts the given pages into the number of bytes contained in these pages.
MiscInstructionName returns the instruction corresponding to this miscellaneous Opcode.
MustParseGoReflectFuncCode parses Code from the go function or panics. Exposing this simplifies FunctionDefinition of host functions in built-in host modules and tests.
NewHostModule is defined internally for use in WASI tests and to keep the code size in the root directory small.
NewMemoryInstance creates a new instance based on the parameters in the SectionIDMemory.
func NewStore(enabledFeatures api.CoreFeatures, engine Engine) *Store
PagesToUnitOfBytes converts the pages to a human-readable form similar to what's specified. e.g. 1 -> "64Ki" See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#memory-instances%E2%91%A0
func RefTypeName(t RefType) (ret string)
SectionIDName returns the canonical name of a module section. https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#sections%E2%91%A0
SplitCallStack returns the input stack resliced to the count of params and results, or errors if it isn't long enough for either.
ValueTypeName is an alias of api.ValueTypeName defined to simplify imports.
VectorInstructionName returns the instruction name corresponding to the vector Opcode.
WrapGlobalIndexAsElementInit wraps the given index as an init item which is resolved via an imported global value. See the comments on elementInitImportedGlobalReferenceType for more details.
Package-Level Constants (total 1054)
ElementInitNullReference represents the null reference in ElementSegment's Init. In Wasm spec, an init item represents either Function's Index or null reference, and in wazero, we limit the maximum number of functions available in a module to MaximumFunctionIndex. Therefore, it is safe to use 1 << 31 to represent the null reference in Element segments.
ElementModeActive is the mode which requires the runtime to initialize table with the contents in .Init field combined with OffsetExpr.
ElementModeDeclarative is introduced in reference-types proposal which can be used to declare function indexes used by OpcodeRefFunc.
ElementModePassive is the mode which doesn't require the runtime to initialize table, and only used with OpcodeTableInitName.
const ExternTypeFuncName = "func"
const ExternTypeGlobalName = "global"
const ExternTypeMemoryName = "memory"
const ExternTypeTableName = "table"
The wazero specific limitation described at RATIONALE.md. TL;DR; We multiply by 8 (to get offsets in bytes) and the multiplication result must be less than 32bit max
The wazero specific limitation described at RATIONALE.md. TL;DR; We multiply by 8 (to get offsets in bytes) and the multiplication result must be less than 32bit max
The wazero specific limitation described at RATIONALE.md. TL;DR; We multiply by 8 (to get offsets in bytes) and the multiplication result must be less than 32bit max
MemoryLimitPages is maximum number of pages defined (2^16). See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#grow-mem
MemoryPageSize is the unit of memory length in WebAssembly, and is defined as 2^16 = 65536. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#memory-instances%E2%91%A0
MemoryPageSizeInBits satisfies the relation: "1 << MemoryPageSizeInBits == MemoryPageSize".
OpcodeAtomicFence represents the instruction atomic.fence.
const OpcodeAtomicFenceName = "atomic.fence"
OpcodeAtomicI32Load represents the instruction i32.atomic.load.
OpcodeAtomicI32Load16U represents the instruction i32.atomic.load16_u.
const OpcodeAtomicI32Load16UName = "i32.atomic.load16_u"
OpcodeAtomicI32Load8U represents the instruction i32.atomic.load8_u.
const OpcodeAtomicI32Load8UName = "i32.atomic.load8_u"
const OpcodeAtomicI32LoadName = "i32.atomic.load"
OpcodeAtomicI32Rmw16AddU represents the instruction i32.atomic.rmw16.add_u.
const OpcodeAtomicI32Rmw16AddUName = "i32.atomic.rmw16.add_u"
OpcodeAtomicI32Rmw16AndU represents the instruction i32.atomic.rmw16.and_u.
const OpcodeAtomicI32Rmw16AndUName = "i32.atomic.rmw16.and_u"
OpcodeAtomicI32Rmw16CmpxchgU represents the instruction i32.atomic.rmw16.cmpxchg_u.
const OpcodeAtomicI32Rmw16CmpxchgUName = "i32.atomic.rmw16.cmpxchg_u"
OpcodeAtomicI32Rmw16OrU represents the instruction i32.atomic.rmw16.or_u.
const OpcodeAtomicI32Rmw16OrUName = "i32.atomic.rmw16.or_u"
OpcodeAtomicI32Rmw16SubU represents the instruction i32.atomic.rmw16.sub_u.
const OpcodeAtomicI32Rmw16SubUName = "i32.atomic.rmw16.sub_u"
OpcodeAtomicI32Rmw16XchgU represents the instruction i32.atomic.rmw16.xchg_u.
const OpcodeAtomicI32Rmw16XchgUName = "i32.atomic.rmw16.xchg_u"
OpcodeAtomicI32Rmw16XorU represents the instruction i32.atomic.rmw16.xor_u.
const OpcodeAtomicI32Rmw16XorUName = "i32.atomic.rmw16.xor_u"
OpcodeAtomicI32Rmw8AddU represents the instruction i32.atomic.rmw8.add_u.
const OpcodeAtomicI32Rmw8AddUName = "i32.atomic.rmw8.add_u"
OpcodeAtomicI32Rmw8AndU represents the instruction i32.atomic.rmw8.and_u.
const OpcodeAtomicI32Rmw8AndUName = "i32.atomic.rmw8.and_u"
OpcodeAtomicI32Rmw8CmpxchgU represents the instruction i32.atomic.rmw8.cmpxchg_u.
const OpcodeAtomicI32Rmw8CmpxchgUName = "i32.atomic.rmw8.cmpxchg_u"
OpcodeAtomicI32Rmw8OrU represents the instruction i32.atomic.rmw8.or_u.
const OpcodeAtomicI32Rmw8OrUName = "i32.atomic.rmw8.or_u"
OpcodeAtomicI32Rmw8SubU represents the instruction i32.atomic.rmw8.sub_u.
const OpcodeAtomicI32Rmw8SubUName = "i32.atomic.rmw8.sub_u"
OpcodeAtomicI32Rmw8XchgU represents the instruction i32.atomic.rmw8.xchg_u.
const OpcodeAtomicI32Rmw8XchgUName = "i32.atomic.rmw8.xchg_u"
OpcodeAtomicI32Rmw8XorU represents the instruction i32.atomic.rmw8.xor_u.
const OpcodeAtomicI32Rmw8XorUName = "i32.atomic.rmw8.xor_u"
OpcodeAtomicI32RmwAdd represents the instruction i32.atomic.rmw.add.
const OpcodeAtomicI32RmwAddName = "i32.atomic.rmw.add"
OpcodeAtomicI32RmwAnd represents the instruction i32.atomic.rmw.and.
const OpcodeAtomicI32RmwAndName = "i32.atomic.rmw.and"
OpcodeAtomicI32RmwCmpxchg represents the instruction i32.atomic.rmw.cmpxchg.
const OpcodeAtomicI32RmwCmpxchgName = "i32.atomic.rmw.cmpxchg"
OpcodeAtomicI32RmwOr represents the instruction i32.atomic.rmw.or.
const OpcodeAtomicI32RmwOrName = "i32.atomic.rmw.or"
OpcodeAtomicI32RmwSub represents the instruction i32.atomic.rmw.sub.
const OpcodeAtomicI32RmwSubName = "i32.atomic.rmw.sub"
OpcodeAtomicI32RmwXchg represents the instruction i32.atomic.rmw.xchg.
const OpcodeAtomicI32RmwXchgName = "i32.atomic.rmw.xchg"
OpcodeAtomicI32RmwXor represents the instruction i32.atomic.rmw.xor.
const OpcodeAtomicI32RmwXorName = "i32.atomic.rmw.xor"
OpcodeAtomicI32Store represents the instruction i32.atomic.store.
OpcodeAtomicI32Store16 represents the instruction i32.atomic.store16.
const OpcodeAtomicI32Store16Name = "i32.atomic.store16"
OpcodeAtomicI32Store8 represents the instruction i32.atomic.store8.
const OpcodeAtomicI32Store8Name = "i32.atomic.store8"
const OpcodeAtomicI32StoreName = "i32.atomic.store"
OpcodeAtomicI64Load represents the instruction i64.atomic.load.
OpcodeAtomicI64Load16U represents the instruction i64.atomic.load16_u.
const OpcodeAtomicI64Load16UName = "i64.atomic.load16_u"
OpcodeAtomicI64Load32U represents the instruction i64.atomic.load32_u.
const OpcodeAtomicI64Load32UName = "i64.atomic.load32_u"
OpcodeAtomicI64Load8U represents the instruction i64.atomic.load8_u.
const OpcodeAtomicI64Load8UName = "i64.atomic.load8_u"
const OpcodeAtomicI64LoadName = "i64.atomic.load"
OpcodeAtomicI64Rmw16AddU represents the instruction i64.atomic.rmw16.add_u.
const OpcodeAtomicI64Rmw16AddUName = "i64.atomic.rmw16.add_u"
OpcodeAtomicI64Rmw16AndU represents the instruction i64.atomic.rmw16.and_u.
const OpcodeAtomicI64Rmw16AndUName = "i64.atomic.rmw16.and_u"
OpcodeAtomicI64Rmw16CmpxchgU represents the instruction i64.atomic.rmw16.cmpxchg_u.
const OpcodeAtomicI64Rmw16CmpxchgUName = "i64.atomic.rmw16.cmpxchg_u"
OpcodeAtomicI64Rmw16OrU represents the instruction i64.atomic.rmw16.or_u.
const OpcodeAtomicI64Rmw16OrUName = "i64.atomic.rmw16.or_u"
OpcodeAtomicI64Rmw16SubU represents the instruction i64.atomic.rmw16.sub_u.
const OpcodeAtomicI64Rmw16SubUName = "i64.atomic.rmw16.sub_u"
OpcodeAtomicI64Rmw16XchgU represents the instruction i64.atomic.rmw16.xchg_u.
const OpcodeAtomicI64Rmw16XchgUName = "i64.atomic.rmw16.xchg_u"
OpcodeAtomicI64Rmw16XorU represents the instruction i64.atomic.rmw16.xor_u.
const OpcodeAtomicI64Rmw16XorUName = "i64.atomic.rmw16.xor_u"
OpcodeAtomicI64Rmw32AddU represents the instruction i64.atomic.rmw32.add_u.
const OpcodeAtomicI64Rmw32AddUName = "i64.atomic.rmw32.add_u"
OpcodeAtomicI64Rmw32AndU represents the instruction i64.atomic.rmw32.and_u.
const OpcodeAtomicI64Rmw32AndUName = "i64.atomic.rmw32.and_u"
OpcodeAtomicI64Rmw32CmpxchgU represents the instruction i64.atomic.rmw32.cmpxchg_u.
const OpcodeAtomicI64Rmw32CmpxchgUName = "i64.atomic.rmw32.cmpxchg_u"
OpcodeAtomicI64Rmw32OrU represents the instruction i64.atomic.rmw32.or_u.
const OpcodeAtomicI64Rmw32OrUName = "i64.atomic.rmw32.or_u"
OpcodeAtomicI64Rmw32SubU represents the instruction i64.atomic.rmw32.sub_u.
const OpcodeAtomicI64Rmw32SubUName = "i64.atomic.rmw32.sub_u"
OpcodeAtomicI64Rmw32XchgU represents the instruction i64.atomic.rmw32.xchg_u.
const OpcodeAtomicI64Rmw32XchgUName = "i64.atomic.rmw32.xchg_u"
OpcodeAtomicI64Rmw32XorU represents the instruction i64.atomic.rmw32.xor_u.
const OpcodeAtomicI64Rmw32XorUName = "i64.atomic.rmw32.xor_u"
OpcodeAtomicI64Rmw8AddU represents the instruction i64.atomic.rmw8.add_u.
const OpcodeAtomicI64Rmw8AddUName = "i64.atomic.rmw8.add_u"
OpcodeAtomicI64Rmw8AndU represents the instruction i64.atomic.rmw8.and_u.
const OpcodeAtomicI64Rmw8AndUName = "i64.atomic.rmw8.and_u"
OpcodeAtomicI64Rmw8CmpxchgU represents the instruction i64.atomic.rmw8.cmpxchg_u.
const OpcodeAtomicI64Rmw8CmpxchgUName = "i64.atomic.rmw8.cmpxchg_u"
OpcodeAtomicI64Rmw8OrU represents the instruction i64.atomic.rmw8.or_u.
const OpcodeAtomicI64Rmw8OrUName = "i64.atomic.rmw8.or_u"
OpcodeAtomicI64Rmw8SubU represents the instruction i64.atomic.rmw8.sub_u.
const OpcodeAtomicI64Rmw8SubUName = "i64.atomic.rmw8.sub_u"
OpcodeAtomicI64Rmw8XchgU represents the instruction i64.atomic.rmw8.xchg_u.
const OpcodeAtomicI64Rmw8XchgUName = "i64.atomic.rmw8.xchg_u"
OpcodeAtomicI64Rmw8XorU represents the instruction i64.atomic.rmw8.xor_u.
const OpcodeAtomicI64Rmw8XorUName = "i64.atomic.rmw8.xor_u"
OpcodeAtomicI64RmwAdd represents the instruction i64.atomic.rmw.add.
const OpcodeAtomicI64RmwAddName = "i64.atomic.rmw.add"
OpcodeAtomicI64RmwAnd represents the instruction i64.atomic.rmw.and.
const OpcodeAtomicI64RmwAndName = "i64.atomic.rmw.and"
OpcodeAtomicI64RmwCmpxchg represents the instruction i64.atomic.rmw.cmpxchg.
const OpcodeAtomicI64RmwCmpxchgName = "i64.atomic.rmw.cmpxchg"
OpcodeAtomicI64RmwOr represents the instruction i64.atomic.rmw.or.
const OpcodeAtomicI64RmwOrName = "i64.atomic.rmw.or"
OpcodeAtomicI64RmwSub represents the instruction i64.atomic.rmw.sub.
const OpcodeAtomicI64RmwSubName = "i64.atomic.rmw.sub"
OpcodeAtomicI64RmwXchg represents the instruction i64.atomic.rmw.xchg.
const OpcodeAtomicI64RmwXchgName = "i64.atomic.rmw.xchg"
OpcodeAtomicI64RmwXor represents the instruction i64.atomic.rmw.xor.
const OpcodeAtomicI64RmwXorName = "i64.atomic.rmw.xor"
OpcodeAtomicI64Store represents the instruction i64.atomic.store.
OpcodeAtomicI64Store16 represents the instruction i64.atomic.store16.
const OpcodeAtomicI64Store16Name = "i64.atomic.store16"
OpcodeAtomicI64Store32 represents the instruction i64.atomic.store32.
const OpcodeAtomicI64Store32Name = "i64.atomic.store32"
OpcodeAtomicI64Store8 represents the instruction i64.atomic.store8.
const OpcodeAtomicI64Store8Name = "i64.atomic.store8"
const OpcodeAtomicI64StoreName = "i64.atomic.store"
OpcodeAtomicMemoryNotify represents the instruction memory.atomic.notify.
const OpcodeAtomicMemoryNotifyName = "memory.atomic.notify"
OpcodeAtomicMemoryWait32 represents the instruction memory.atomic.wait32.
const OpcodeAtomicMemoryWait32Name = "memory.atomic.wait32"
OpcodeAtomicMemoryWait64 represents the instruction memory.atomic.wait64.
const OpcodeAtomicMemoryWait64Name = "memory.atomic.wait64"
OpcodeAtomicPrefix is the prefix of all atomic instructions introduced in CoreFeatureThreads.
const OpcodeAtomicPrefixName = "atomic_prefix"
OpcodeBlock brackets a sequence of instructions. A branch instruction on an if label breaks out to after its OpcodeEnd.
const OpcodeBlockName = "block"
OpcodeBr is a stack-polymorphic opcode that performs an unconditional branch. How the stack is modified depends on whether the "br" is enclosed by a loop, and if CoreFeatureMultiValue is enabled. Here are the rules in pseudocode about how the stack is modified based on the "br" operand L (label): if L is loop: append(L.originalStackWithoutInputs, N-values popped from the stack) where N == L.inputs else: append(L.originalStackWithoutInputs, N-values popped from the stack) where N == L.results In WebAssembly 1.0 (20191205), N can be zero or one. When CoreFeatureMultiValue is enabled, N can be more than one, depending on the type use of the label L. See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#-hrefsyntax-instr-controlmathsfbrl
const OpcodeBrIf Opcode = 13
const OpcodeBrIfName = "br_if"
const OpcodeBrName = "br"
const OpcodeBrTable Opcode = 14
const OpcodeBrTableName = "br_table"
const OpcodeCall Opcode = 16
const OpcodeCallIndirectName = "call_indirect"
const OpcodeCallName = "call"
const OpcodeDataDropName = "data.drop"
const OpcodeDrop Opcode = 26
const OpcodeDropName = "drop"
const OpcodeElemDropName = "elem.drop"
OpcodeElse brackets a sequence of instructions enclosed by an OpcodeIf. A branch instruction on a then label breaks out to after the OpcodeEnd on the enclosing OpcodeIf.
const OpcodeElseName = "else"
OpcodeEnd terminates a control instruction OpcodeBlock, OpcodeLoop or OpcodeIf.
const OpcodeEndName = "end"
const OpcodeF32Abs Opcode = 139
const OpcodeF32AbsName = "f32.abs"
const OpcodeF32Add Opcode = 146
const OpcodeF32AddName = "f32.add"
const OpcodeF32Ceil Opcode = 141
const OpcodeF32CeilName = "f32.ceil"
const OpcodeF32ConstName = "f32.const"
const OpcodeF32ConvertI32SName = "f32.convert_i32_s"
const OpcodeF32ConvertI32UName = "f32.convert_i32_u"
const OpcodeF32ConvertI64SName = "f32.convert_i64_s"
const OpcodeF32ConvertI64UName = "f32.convert_i64u"
const OpcodeF32CopysignName = "f32.copysign"
const OpcodeF32DemoteF64Name = "f32.demote_f64"
const OpcodeF32Div Opcode = 149
const OpcodeF32DivName = "f32.div"
const OpcodeF32Eq Opcode = 91
const OpcodeF32EqName = "f32.eq"
const OpcodeF32Floor Opcode = 142
const OpcodeF32FloorName = "f32.floor"
const OpcodeF32Ge Opcode = 96
const OpcodeF32GeName = "f32.ge"
const OpcodeF32Gt Opcode = 94
const OpcodeF32GtName = "f32.gt"
const OpcodeF32Le Opcode = 95
const OpcodeF32LeName = "f32.le"
const OpcodeF32Load Opcode = 42
const OpcodeF32LoadName = "f32.load"
const OpcodeF32Lt Opcode = 93
const OpcodeF32LtName = "f32.lt"
const OpcodeF32Max Opcode = 151
const OpcodeF32MaxName = "f32.max"
const OpcodeF32Min Opcode = 150
const OpcodeF32MinName = "f32.min"
const OpcodeF32Mul Opcode = 148
const OpcodeF32MulName = "f32.mul"
const OpcodeF32Ne Opcode = 92
const OpcodeF32NearestName = "f32.nearest"
const OpcodeF32Neg Opcode = 140
const OpcodeF32NegName = "f32.neg"
const OpcodeF32NeName = "f32.ne"
const OpcodeF32ReinterpretI32Name = "f32.reinterpret_i32"
const OpcodeF32Sqrt Opcode = 145
const OpcodeF32SqrtName = "f32.sqrt"
const OpcodeF32StoreName = "f32.store"
const OpcodeF32Sub Opcode = 147
const OpcodeF32SubName = "f32.sub"
const OpcodeF32Trunc Opcode = 143
const OpcodeF32TruncName = "f32.trunc"
const OpcodeF64Abs Opcode = 153
const OpcodeF64AbsName = "f64.abs"
const OpcodeF64Add Opcode = 160
const OpcodeF64AddName = "f64.add"
const OpcodeF64Ceil Opcode = 155
const OpcodeF64CeilName = "f64.ceil"
const OpcodeF64ConstName = "f64.const"
const OpcodeF64ConvertI32SName = "f64.convert_i32_s"
const OpcodeF64ConvertI32UName = "f64.convert_i32_u"
const OpcodeF64ConvertI64SName = "f64.convert_i64_s"
const OpcodeF64ConvertI64UName = "f64.convert_i64_u"
const OpcodeF64CopysignName = "f64.copysign"
const OpcodeF64Div Opcode = 163
const OpcodeF64DivName = "f64.div"
const OpcodeF64Eq Opcode = 97
const OpcodeF64EqName = "f64.eq"
const OpcodeF64Floor Opcode = 156
const OpcodeF64FloorName = "f64.floor"
const OpcodeF64Ge Opcode = 102
const OpcodeF64GeName = "f64.ge"
const OpcodeF64Gt Opcode = 100
const OpcodeF64GtName = "f64.gt"
const OpcodeF64Le Opcode = 101
const OpcodeF64LeName = "f64.le"
const OpcodeF64Load Opcode = 43
const OpcodeF64LoadName = "f64.load"
const OpcodeF64Lt Opcode = 99
const OpcodeF64LtName = "f64.lt"
const OpcodeF64Max Opcode = 165
const OpcodeF64MaxName = "f64.max"
const OpcodeF64Min Opcode = 164
const OpcodeF64MinName = "f64.min"
const OpcodeF64Mul Opcode = 162
const OpcodeF64MulName = "f64.mul"
const OpcodeF64Ne Opcode = 98
const OpcodeF64NearestName = "f64.nearest"
const OpcodeF64Neg Opcode = 154
const OpcodeF64NegName = "f64.neg"
const OpcodeF64NeName = "f64.ne"
const OpcodeF64PromoteF32Name = "f64.promote_f32"
const OpcodeF64ReinterpretI64Name = "f64.reinterpret_i64"
const OpcodeF64Sqrt Opcode = 159
const OpcodeF64SqrtName = "f64.sqrt"
const OpcodeF64StoreName = "f64.store"
const OpcodeF64Sub Opcode = 161
const OpcodeF64SubName = "f64.sub"
const OpcodeF64Trunc Opcode = 157
const OpcodeF64TruncName = "f64.trunc"
const OpcodeGlobalGetName = "global.get"
const OpcodeGlobalSetName = "global.set"
const OpcodeI32Add Opcode = 106
const OpcodeI32AddName = "i32.add"
const OpcodeI32And Opcode = 113
const OpcodeI32AndName = "i32.and"
const OpcodeI32Clz Opcode = 103
const OpcodeI32ClzName = "i32.clz"
const OpcodeI32ConstName = "i32.const"
const OpcodeI32Ctz Opcode = 104
const OpcodeI32CtzName = "i32.ctz"
const OpcodeI32DivS Opcode = 109
const OpcodeI32DivSName = "i32.div_s"
const OpcodeI32DivU Opcode = 110
const OpcodeI32DivUName = "i32.div_u"
const OpcodeI32Eq Opcode = 70
const OpcodeI32EqName = "i32.eq"
const OpcodeI32Eqz Opcode = 69
const OpcodeI32EqzName = "i32.eqz"
OpcodeI32Extend16S extends a signed 16-bit integer to a 32-bit integer. Note: This is dependent on the flag CoreFeatureSignExtensionOps
const OpcodeI32Extend16SName = "i32.extend16_s"
OpcodeI32Extend8S extends a signed 8-bit integer to a 32-bit integer. Note: This is dependent on the flag CoreFeatureSignExtensionOps
const OpcodeI32Extend8SName = "i32.extend8_s"
const OpcodeI32GeS Opcode = 78
const OpcodeI32GeSName = "i32.ge_s"
const OpcodeI32GeU Opcode = 79
const OpcodeI32GeUName = "i32.ge_u"
const OpcodeI32GtS Opcode = 74
const OpcodeI32GtSName = "i32.gt_s"
const OpcodeI32GtU Opcode = 75
const OpcodeI32GtUName = "i32.gt_u"
const OpcodeI32LeS Opcode = 76
const OpcodeI32LeSName = "i32.le_s"
const OpcodeI32LeU Opcode = 77
const OpcodeI32LeUName = "i32.le_u"
const OpcodeI32Load Opcode = 40
const OpcodeI32Load16SName = "i32.load16_s"
const OpcodeI32Load16UName = "i32.load16_u"
const OpcodeI32Load8SName = "i32.load8_s"
const OpcodeI32Load8UName = "i32.load8_u"
const OpcodeI32LoadName = "i32.load"
const OpcodeI32LtS Opcode = 72
const OpcodeI32LtSName = "i32.lt_s"
const OpcodeI32LtU Opcode = 73
const OpcodeI32LtUName = "i32.lt_u"
const OpcodeI32Mul Opcode = 108
const OpcodeI32MulName = "i32.mul"
const OpcodeI32Ne Opcode = 71
const OpcodeI32NeName = "i32.ne"
const OpcodeI32Or Opcode = 114
const OpcodeI32OrName = "i32.or"
const OpcodeI32Popcnt Opcode = 105
const OpcodeI32PopcntName = "i32.popcnt"
const OpcodeI32ReinterpretF32Name = "i32.reinterpret_f32"
const OpcodeI32RemS Opcode = 111
const OpcodeI32RemSName = "i32.rem_s"
const OpcodeI32RemU Opcode = 112
const OpcodeI32RemUName = "i32.rem_u"
const OpcodeI32Rotl Opcode = 119
const OpcodeI32RotlName = "i32.rotl"
const OpcodeI32Rotr Opcode = 120
const OpcodeI32RotrName = "i32.rotr"
const OpcodeI32Shl Opcode = 116
const OpcodeI32ShlName = "i32.shl"
const OpcodeI32ShrS Opcode = 117
const OpcodeI32ShrSName = "i32.shr_s"
const OpcodeI32ShrU Opcode = 118
const OpcodeI32ShrUName = "i32.shr_u"
const OpcodeI32Store16Name = "i32.store16"
const OpcodeI32Store8Name = "i32.store8"
const OpcodeI32StoreName = "i32.store"
const OpcodeI32Sub Opcode = 107
const OpcodeI32SubName = "i32.sub"
const OpcodeI32TruncF32SName = "i32.trunc_f32_s"
const OpcodeI32TruncF32UName = "i32.trunc_f32_u"
const OpcodeI32TruncF64SName = "i32.trunc_f64_s"
const OpcodeI32TruncF64UName = "i32.trunc_f64_u"
const OpcodeI32TruncSatF32SName = "i32.trunc_sat_f32_s"
const OpcodeI32TruncSatF32UName = "i32.trunc_sat_f32_u"
const OpcodeI32TruncSatF64SName = "i32.trunc_sat_f64_s"
const OpcodeI32TruncSatF64UName = "i32.trunc_sat_f64_u"
const OpcodeI32WrapI64Name = "i32.wrap_i64"
const OpcodeI32Xor Opcode = 115
const OpcodeI32XorName = "i32.xor"
const OpcodeI64Add Opcode = 124
const OpcodeI64AddName = "i64.add"
const OpcodeI64And Opcode = 131
const OpcodeI64AndName = "i64.and"
const OpcodeI64Clz Opcode = 121
const OpcodeI64ClzName = "i64.clz"
const OpcodeI64ConstName = "i64.const"
const OpcodeI64Ctz Opcode = 122
const OpcodeI64CtzName = "i64.ctz"
const OpcodeI64DivS Opcode = 127
const OpcodeI64DivSName = "i64.div_s"
const OpcodeI64DivU Opcode = 128
const OpcodeI64DivUName = "i64.div_u"
const OpcodeI64Eq Opcode = 81
const OpcodeI64EqName = "i64.eq"
const OpcodeI64Eqz Opcode = 80
const OpcodeI64EqzName = "i64.eqz"
OpcodeI64Extend16S extends a signed 16-bit integer to a 64-bit integer. Note: This is dependent on the flag CoreFeatureSignExtensionOps
const OpcodeI64Extend16SName = "i64.extend16_s"
OpcodeI64Extend32S extends a signed 32-bit integer to a 64-bit integer. Note: This is dependent on the flag CoreFeatureSignExtensionOps
const OpcodeI64Extend32SName = "i64.extend32_s"
OpcodeI64Extend8S extends a signed 8-bit integer to a 64-bit integer. Note: This is dependent on the flag CoreFeatureSignExtensionOps
const OpcodeI64Extend8SName = "i64.extend8_s"
const OpcodeI64ExtendI32SName = "i64.extend_i32_s"
const OpcodeI64ExtendI32UName = "i64.extend_i32_u"
const OpcodeI64GeS Opcode = 89
const OpcodeI64GeSName = "i64.ge_s"
const OpcodeI64GeU Opcode = 90
const OpcodeI64GeUName = "i64.ge_u"
const OpcodeI64GtS Opcode = 85
const OpcodeI64GtSName = "i64.gt_s"
const OpcodeI64GtU Opcode = 86
const OpcodeI64GtUName = "i64.gt_u"
const OpcodeI64LeS Opcode = 87
const OpcodeI64LeSName = "i64.le_s"
const OpcodeI64LeU Opcode = 88
const OpcodeI64LeUName = "i64.le_u"
const OpcodeI64Load Opcode = 41
const OpcodeI64Load16SName = "i64.load16_s"
const OpcodeI64Load16UName = "i64.load16_u"
const OpcodeI64Load32SName = "i64.load32_s"
const OpcodeI64Load32UName = "i64.load32_u"
const OpcodeI64Load8SName = "i64.load8_s"
const OpcodeI64Load8UName = "i64.load8_u"
const OpcodeI64LoadName = "i64.load"
const OpcodeI64LtS Opcode = 83
const OpcodeI64LtSName = "i64.lt_s"
const OpcodeI64LtU Opcode = 84
const OpcodeI64LtUName = "i64.lt_u"
const OpcodeI64Mul Opcode = 126
const OpcodeI64MulName = "i64.mul"
const OpcodeI64Ne Opcode = 82
const OpcodeI64NeName = "i64.ne"
const OpcodeI64Or Opcode = 132
const OpcodeI64OrName = "i64.or"
const OpcodeI64Popcnt Opcode = 123
const OpcodeI64PopcntName = "i64.popcnt"
const OpcodeI64ReinterpretF64Name = "i64.reinterpret_f64"
const OpcodeI64RemS Opcode = 129
const OpcodeI64RemSName = "i64.rem_s"
const OpcodeI64RemU Opcode = 130
const OpcodeI64RemUName = "i64.rem_u"
const OpcodeI64Rotl Opcode = 137
const OpcodeI64RotlName = "i64.rotl"
const OpcodeI64Rotr Opcode = 138
const OpcodeI64RotrName = "i64.rotr"
const OpcodeI64Shl Opcode = 134
const OpcodeI64ShlName = "i64.shl"
const OpcodeI64ShrS Opcode = 135
const OpcodeI64ShrSName = "i64.shr_s"
const OpcodeI64ShrU Opcode = 136
const OpcodeI64ShrUName = "i64.shr_u"
const OpcodeI64Store16Name = "i64.store16"
const OpcodeI64Store32Name = "i64.store32"
const OpcodeI64Store8Name = "i64.store8"
const OpcodeI64StoreName = "i64.store"
const OpcodeI64Sub Opcode = 125
const OpcodeI64SubName = "i64.sub"
const OpcodeI64TruncF32SName = "i64.trunc_f32_s"
const OpcodeI64TruncF32UName = "i64.trunc_f32_u"
const OpcodeI64TruncF64SName = "i64.trunc_f64_s"
const OpcodeI64TruncF64UName = "i64.trunc_f64_u"
const OpcodeI64TruncSatF32SName = "i64.trunc_sat_f32_s"
const OpcodeI64TruncSatF32UName = "i64.trunc_sat_f32_u"
const OpcodeI64TruncSatF64SName = "i64.trunc_sat_f64_s"
const OpcodeI64TruncSatF64UName = "i64.trunc_sat_f64_u"
const OpcodeI64Xor Opcode = 133
const OpcodeI64XorName = "i64.xor"
OpcodeIf brackets a sequence of instructions. When the top of the stack evaluates to 1, the block is executed. Zero jumps to the optional OpcodeElse. A branch instruction on an if label breaks out to after its OpcodeEnd.
const OpcodeIfName = "if"
const OpcodeLocalGetName = "local.get"
const OpcodeLocalSetName = "local.set"
const OpcodeLocalTeeName = "local.tee"
OpcodeLoop brackets a sequence of instructions. A branch instruction on a loop label will jump back to the beginning of its block.
const OpcodeLoopName = "loop"
const OpcodeMemoryCopyName = "memory.copy"
const OpcodeMemoryFillName = "memory.fill"
const OpcodeMemoryGrowName = "memory.grow"
const OpcodeMemoryInitName = "memory.init"
const OpcodeMemorySizeName = "memory.size"
OpcodeMiscPrefix is the prefix of various multi-byte opcodes. Introduced in CoreFeatureNonTrappingFloatToIntConversion, but used in other features, such as CoreFeatureBulkMemoryOperations.
const OpcodeMiscPrefixName = "misc_prefix"
OpcodeNop does nothing
const OpcodeNopName = "nop"
OpcodeRefFunc pushes a funcref value whose index equals the immediate to this opcode. This is defined in the reference-types proposal, but necessary for CoreFeatureBulkMemoryOperations as well. Currently, this is only supported in the constant expression in element segments.
const OpcodeRefFuncName = "ref.func"
OpcodeRefIsNull pops a reference value, and pushes 1 if it is null, 0 otherwise. This is defined in the reference-types proposal, but necessary for CoreFeatureBulkMemoryOperations as well. Currently not supported.
const OpcodeRefIsNullName = "ref.is_null"
OpcodeRefNull pushes a null reference value whose type is specified by immediate to this opcode. This is defined in the reference-types proposal, but necessary for CoreFeatureBulkMemoryOperations as well. Currently only supported in the constant expression in element segments.
const OpcodeRefNullName = "ref.null"
const OpcodeReturn Opcode = 15
const OpcodeReturnName = "return"
const OpcodeSelect Opcode = 27
const OpcodeSelectName = "select"
const OpcodeTableCopyName = "table.copy"
const OpcodeTableFillName = "table.fill"
const OpcodeTableGetName = "table.get"
const OpcodeTableGrowName = "table.grow"
const OpcodeTableInitName = "table.init"
const OpcodeTableSetName = "table.set"
const OpcodeTableSizeName = "table.size"
const OpcodeTypedSelectName = "typed_select"
OpcodeUnreachable causes an unconditional trap.
const OpcodeUnreachableName = "unreachable"
const OpcodeVecF32x4AbsName = "f32x4.abs"
const OpcodeVecF32x4AddName = "f32x4.add"
const OpcodeVecF32x4CeilName = "f32x4.ceil"
const OpcodeVecF32x4ConvertI32x4SName = "f32x4.convert_i32x4_s"
const OpcodeVecF32x4ConvertI32x4UName = "f32x4.convert_i32x4_u"
const OpcodeVecF32x4DemoteF64x2ZeroName = "f32x4.demote_f64x2_zero"
const OpcodeVecF32x4DivName = "f32x4.div"
const OpcodeVecF32x4EqName = "f32x4.eq"
const OpcodeVecF32x4ExtractLaneName = "f32x4.extract_lane"
const OpcodeVecF32x4FloorName = "f32x4.floor"
const OpcodeVecF32x4GeName = "f32x4.ge"
const OpcodeVecF32x4GtName = "f32x4.gt"
const OpcodeVecF32x4LeName = "f32x4.le"
const OpcodeVecF32x4LtName = "f32x4.lt"
const OpcodeVecF32x4MaxName = "f32x4.max"
const OpcodeVecF32x4MinName = "f32x4.min"
const OpcodeVecF32x4MulName = "f32x4.mul"
const OpcodeVecF32x4NearestName = "f32x4.nearest"
const OpcodeVecF32x4NegName = "f32x4.neg"
const OpcodeVecF32x4NeName = "f32x4.ne"
const OpcodeVecF32x4PmaxName = "f32x4.pmax"
const OpcodeVecF32x4PminName = "f32x4.pmin"
const OpcodeVecF32x4ReplaceLaneName = "f32x4.replace_lane"
const OpcodeVecF32x4SplatName = "f32x4.splat"
const OpcodeVecF32x4SqrtName = "f32x4.sqrt"
const OpcodeVecF32x4SubName = "f32x4.sub"
const OpcodeVecF32x4TruncName = "f32x4.trunc"
const OpcodeVecF64x2AbsName = "f64x2.abs"
const OpcodeVecF64x2AddName = "f64x2.add"
const OpcodeVecF64x2CeilName = "f64x2.ceil"
const OpcodeVecF64x2ConvertLowI32x4SName = "f64x2.convert_low_i32x4_s"
const OpcodeVecF64x2ConvertLowI32x4UName = "f64x2.convert_low_i32x4_u"
const OpcodeVecF64x2DivName = "f64x2.div"
const OpcodeVecF64x2EqName = "f64x2.eq"
const OpcodeVecF64x2ExtractLaneName = "f64x2.extract_lane"
const OpcodeVecF64x2FloorName = "f64x2.floor"
const OpcodeVecF64x2GeName = "f64x2.ge"
const OpcodeVecF64x2GtName = "f64x2.gt"
const OpcodeVecF64x2LeName = "f64x2.le"
const OpcodeVecF64x2LtName = "f64x2.lt"
const OpcodeVecF64x2MaxName = "f64x2.max"
const OpcodeVecF64x2MinName = "f64x2.min"
const OpcodeVecF64x2MulName = "f64x2.mul"
const OpcodeVecF64x2NearestName = "f64x2.nearest"
const OpcodeVecF64x2NegName = "f64x2.neg"
const OpcodeVecF64x2NeName = "f64x2.ne"
const OpcodeVecF64x2PmaxName = "f64x2.pmax"
const OpcodeVecF64x2PminName = "f64x2.pmin"
const OpcodeVecF64x2PromoteLowF32x4ZeroName = "f64x2.promote_low_f32x4"
const OpcodeVecF64x2ReplaceLaneName = "f64x2.replace_lane"
const OpcodeVecF64x2SplatName = "f64x2.splat"
const OpcodeVecF64x2SqrtName = "f64x2.sqrt"
const OpcodeVecF64x2SubName = "f64x2.sub"
const OpcodeVecF64x2TruncName = "f64x2.trunc"
const OpcodeVecI16x8AbsName = "i16x8.abs"
const OpcodeVecI16x8AddName = "i16x8.add"
const OpcodeVecI16x8AddSatSName = "i16x8.add_sat_s"
const OpcodeVecI16x8AddSatUName = "i16x8.add_sat_u"
const OpcodeVecI16x8AllTrueName = "i16x8.all_true"
const OpcodeVecI16x8AvgrUName = "i16x8.avgr_u"
const OpcodeVecI16x8BitMaskName = "i16x8.bitmask"
const OpcodeVecI16x8EqName = "i16x8.eq"
const OpcodeVecI16x8ExtaddPairwiseI8x16SName = "i16x8.extadd_pairwise_i8x16_s"
const OpcodeVecI16x8ExtaddPairwiseI8x16UName = "i16x8.extadd_pairwise_i8x16_u"
const OpcodeVecI16x8ExtendHighI8x16SName = "i16x8.extend_high_i8x16_s"
const OpcodeVecI16x8ExtendHighI8x16UName = "i16x8.extend_high_i8x16_u"
const OpcodeVecI16x8ExtendLowI8x16SName = "i16x8.extend_low_i8x16_s"
const OpcodeVecI16x8ExtendLowI8x16UName = "i16x8.extend_low_i8x16_u"
const OpcodeVecI16x8ExtMulHighI8x16SName = "i16x8.extmul_high_i8x16_s"
const OpcodeVecI16x8ExtMulHighI8x16UName = "i16x8.extmul_high_i8x16_u"
const OpcodeVecI16x8ExtMulLowI8x16SName = "i16x8.extmul_low_i8x16_s"
const OpcodeVecI16x8ExtMulLowI8x16UName = "i16x8.extmul_low_i8x16_u"
const OpcodeVecI16x8ExtractLaneSName = "i16x8.extract_lane_s"
const OpcodeVecI16x8ExtractLaneUName = "i16x8.extract_lane_u"
const OpcodeVecI16x8GeSName = "i16x8.ge_s"
const OpcodeVecI16x8GeUName = "i16x8.ge_u"
const OpcodeVecI16x8GtSName = "i16x8.gt_s"
const OpcodeVecI16x8GtUName = "i16x8.gt_u"
const OpcodeVecI16x8LeSName = "i16x8.le_s"
const OpcodeVecI16x8LeUName = "i16x8.le_u"
const OpcodeVecI16x8LtSName = "i16x8.lt_s"
const OpcodeVecI16x8LtUName = "i16x8.lt_u"
const OpcodeVecI16x8MaxSName = "i16x8.max_s"
const OpcodeVecI16x8MaxUName = "i16x8.max_u"
const OpcodeVecI16x8MinSName = "i16x8.min_s"
const OpcodeVecI16x8MinUName = "i16x8.min_u"
const OpcodeVecI16x8MulName = "i16x8.mul"
const OpcodeVecI16x8NarrowI32x4SName = "i16x8.narrow_i32x4_s"
const OpcodeVecI16x8NarrowI32x4UName = "i16x8.narrow_i32x4_u"
const OpcodeVecI16x8NegName = "i16x8.neg"
const OpcodeVecI16x8NeName = "i16x8.ne"
const OpcodeVecI16x8Q15mulrSatSName = "i16x8.q15mulr_sat_s"
const OpcodeVecI16x8ReplaceLaneName = "i16x8.replace_lane"
const OpcodeVecI16x8ShlName = "i16x8.shl"
const OpcodeVecI16x8ShrSName = "i16x8.shr_s"
const OpcodeVecI16x8ShrUName = "i16x8.shr_u"
const OpcodeVecI16x8SplatName = "i16x8.splat"
const OpcodeVecI16x8SubName = "i16x8.sub"
const OpcodeVecI16x8SubSatSName = "i16x8.sub_sat_s"
const OpcodeVecI16x8SubSatUName = "i16x8.sub_sat_u"
const OpcodeVecI32x4AbsName = "i32x4.abs"
const OpcodeVecI32x4AddName = "i32x4.add"
const OpcodeVecI32x4AllTrueName = "i32x4.all_true"
const OpcodeVecI32x4BitMaskName = "i32x4.bitmask"
const OpcodeVecI32x4DotI16x8SName = "i32x4.dot_i16x8_s"
const OpcodeVecI32x4EqName = "i32x4.eq"
const OpcodeVecI32x4ExtaddPairwiseI16x8SName = "i32x4.extadd_pairwise_i16x8_s"
const OpcodeVecI32x4ExtaddPairwiseI16x8UName = "i32x4.extadd_pairwise_i16x8_u"
const OpcodeVecI32x4ExtendHighI16x8SName = "i32x4.extend_high_i16x8_s"
const OpcodeVecI32x4ExtendHighI16x8UName = "i32x4.extend_high_i16x8_u"
const OpcodeVecI32x4ExtendLowI16x8SName = "i32x4.extend_low_i16x8_s"
const OpcodeVecI32x4ExtendLowI16x8UName = "i32x4.extend_low_i16x8_u"
const OpcodeVecI32x4ExtMulHighI16x8SName = "i32x4.extmul_high_i16x8_s"
const OpcodeVecI32x4ExtMulHighI16x8UName = "i32x4.extmul_high_i16x8_u"
const OpcodeVecI32x4ExtMulLowI16x8SName = "i32x4.extmul_low_i16x8_s"
const OpcodeVecI32x4ExtMulLowI16x8UName = "i32x4.extmul_low_i16x8_u"
const OpcodeVecI32x4ExtractLaneName = "i32x4.extract_lane"
const OpcodeVecI32x4GeSName = "i32x4.ge_s"
const OpcodeVecI32x4GeUName = "i32x4.ge_u"
const OpcodeVecI32x4GtSName = "i32x4.gt_s"
const OpcodeVecI32x4GtUName = "i32x4.gt_u"
const OpcodeVecI32x4LeSName = "i32x4.le_s"
const OpcodeVecI32x4LeUName = "i32x4.le_u"
const OpcodeVecI32x4LtSName = "i32x4.lt_s"
const OpcodeVecI32x4LtUName = "i32x4.lt_u"
const OpcodeVecI32x4MaxSName = "i32x4.max_s"
const OpcodeVecI32x4MaxUName = "i32x4.max_u"
const OpcodeVecI32x4MinSName = "i32x4.min_s"
const OpcodeVecI32x4MinUName = "i32x4.min_u"
const OpcodeVecI32x4MulName = "i32x4.mul"
const OpcodeVecI32x4NegName = "i32x4.neg"
const OpcodeVecI32x4NeName = "i32x4.ne"
const OpcodeVecI32x4ReplaceLaneName = "i32x4.replace_lane"
const OpcodeVecI32x4ShlName = "i32x4.shl"
const OpcodeVecI32x4ShrSName = "i32x4.shr_s"
const OpcodeVecI32x4ShrUName = "i32x4.shr_u"
const OpcodeVecI32x4SplatName = "i32x4.splat"
const OpcodeVecI32x4SubName = "i32x4.sub"
const OpcodeVecI32x4TruncSatF32x4SName = "i32x4.trunc_sat_f32x4_s"
const OpcodeVecI32x4TruncSatF32x4UName = "i32x4.trunc_sat_f32x4_u"
const OpcodeVecI32x4TruncSatF64x2SZeroName = "i32x4.trunc_sat_f64x2_s_zero"
const OpcodeVecI32x4TruncSatF64x2UZeroName = "i32x4.trunc_sat_f64x2_u_zero"
const OpcodeVecI64x2AbsName = "i64x2.abs"
const OpcodeVecI64x2AddName = "i64x2.add"
const OpcodeVecI64x2AllTrueName = "i64x2.all_true"
const OpcodeVecI64x2BitMaskName = "i64x2.bitmask"
const OpcodeVecI64x2EqName = "i64x2.eq"
const OpcodeVecI64x2ExtendHighI32x4SName = "i64x2.extend_high_i32x4_s"
const OpcodeVecI64x2ExtendHighI32x4UName = "i64x2.extend_high_i32x4_u"
const OpcodeVecI64x2ExtendLowI32x4SName = "i64x2.extend_low_i32x4_s"
const OpcodeVecI64x2ExtendLowI32x4UName = "i64x2.extend_low_i32x4_u"
const OpcodeVecI64x2ExtMulHighI32x4SName = "i64x2.extmul_high_i32x4_s"
const OpcodeVecI64x2ExtMulHighI32x4UName = "i64x2.extmul_high_i32x4_u"
const OpcodeVecI64x2ExtMulLowI32x4SName = "i64x2.extmul_low_i32x4_s"
const OpcodeVecI64x2ExtMulLowI32x4UName = "i64x2.extmul_low_i32x4_u"
const OpcodeVecI64x2ExtractLaneName = "i64x2.extract_lane"
const OpcodeVecI64x2GeSName = "i64x2.ge"
const OpcodeVecI64x2GtSName = "i64x2.gt"
const OpcodeVecI64x2LeSName = "i64x2.le"
const OpcodeVecI64x2LtSName = "i64x2.lt"
const OpcodeVecI64x2MulName = "i64x2.mul"
const OpcodeVecI64x2NegName = "i64x2.neg"
const OpcodeVecI64x2NeName = "i64x2.ne"
const OpcodeVecI64x2ReplaceLaneName = "i64x2.replace_lane"
const OpcodeVecI64x2ShlName = "i64x2.shl"
const OpcodeVecI64x2ShrSName = "i64x2.shr_s"
const OpcodeVecI64x2ShrUName = "i64x2.shr_u"
const OpcodeVecI64x2SplatName = "i64x2.splat"
const OpcodeVecI64x2SubName = "i64x2.sub"
const OpcodeVecI8x16AbsName = "i8x16.abs"
const OpcodeVecI8x16AddName = "i8x16.add"
const OpcodeVecI8x16AddSatSName = "i8x16.add_sat_s"
const OpcodeVecI8x16AddSatUName = "i8x16.add_sat_u"
const OpcodeVecI8x16AllTrueName = "i8x16.all_true"
const OpcodeVecI8x16AvgrUName = "i8x16.avgr_u"
const OpcodeVecI8x16BitMaskName = "i8x16.bitmask"
const OpcodeVecI8x16EqName = "i8x16.eq"
const OpcodeVecI8x16ExtractLaneSName = "i8x16.extract_lane_s"
const OpcodeVecI8x16ExtractLaneUName = "i8x16.extract_lane_u"
const OpcodeVecI8x16GeSName = "i8x16.ge_s"
const OpcodeVecI8x16GeUName = "i8x16.ge_u"
const OpcodeVecI8x16GtSName = "i8x16.gt_s"
const OpcodeVecI8x16GtUName = "i8x16.gt_u"
const OpcodeVecI8x16LeSName = "i8x16.le_s"
const OpcodeVecI8x16LeUName = "i8x16.le_u"
const OpcodeVecI8x16LtSName = "i8x16.lt_s"
const OpcodeVecI8x16LtUName = "i8x16.lt_u"
const OpcodeVecI8x16MaxSName = "i8x16.max_s"
const OpcodeVecI8x16MaxUName = "i8x16.max_u"
const OpcodeVecI8x16MinSName = "i8x16.min_s"
const OpcodeVecI8x16MinUName = "i8x16.min_u"
const OpcodeVecI8x16NarrowI16x8SName = "i8x16.narrow_i16x8_s"
const OpcodeVecI8x16NarrowI16x8UName = "i8x16.narrow_i16x8_u"
const OpcodeVecI8x16NegName = "i8x16.neg"
const OpcodeVecI8x16NeName = "i8x16.ne"
const OpcodeVecI8x16PopcntName = "i8x16.popcnt"
const OpcodeVecI8x16ReplaceLaneName = "i8x16.replace_lane"
const OpcodeVecI8x16ShlName = "i8x16.shl"
const OpcodeVecI8x16ShrSName = "i8x16.shr_s"
const OpcodeVecI8x16ShrUName = "i8x16.shr_u"
const OpcodeVecI8x16SplatName = "i8x16.splat"
const OpcodeVecI8x16SubName = "i8x16.sub"
const OpcodeVecI8x16SubSatSName = "i8x16.sub_s"
const OpcodeVecI8x16SubSatUName = "i8x16.sub_u"
const OpcodeVecI8x16SwizzleName = "i8x16.swizzle"
OpcodeVecPrefix is the prefix of all vector isntructions introduced in CoreFeatureSIMD.
const OpcodeVecPrefixName = "vector_prefix"
const OpcodeVecV128AndName = "v128.and"
const OpcodeVecV128AndNotName = "v128.andnot"
const OpcodeVecV128AnyTrueName = "v128.any_true"
const OpcodeVecV128BitselectName = "v128.bitselect"
OpcodeVecV128Const is the vector const instruction.
const OpcodeVecV128ConstName = "v128.const"
OpcodeVecV128i8x16Shuffle is the vector shuffle instruction.
const OpcodeVecV128i8x16ShuffleName = "v128.shuffle"
const OpcodeVecV128Load16LaneName = "v128.load16_lane"
const OpcodeVecV128Load16SplatName = "v128.load16_splat"
const OpcodeVecV128Load16x4SName = "v128.load16x4_s"
const OpcodeVecV128Load16x4UName = "v128.load16x4_u"
const OpcodeVecV128Load32LaneName = "v128.load32_lane"
const OpcodeVecV128Load32SplatName = "v128.load32_splat"
const OpcodeVecV128Load32x2SName = "v128.load32x2_s"
const OpcodeVecV128Load32x2UName = "v128.load32x2_u"
const OpcodeVecV128Load32zeroName = "v128.load32_zero"
const OpcodeVecV128Load64LaneName = "v128.load64_lane"
const OpcodeVecV128Load64SplatName = "v128.load64_splat"
const OpcodeVecV128Load64zeroName = "v128.load64_zero"
const OpcodeVecV128Load8LaneName = "v128.load8_lane"
const OpcodeVecV128Load8SplatName = "v128.load8_splat"
const OpcodeVecV128Load8x8SName = "v128.load8x8_s"
const OpcodeVecV128Load8x8UName = "v128.load8x8_u"
const OpcodeVecV128LoadName = "v128.load"
const OpcodeVecV128NotName = "v128.not"
const OpcodeVecV128OrName = "v128.or"
const OpcodeVecV128Store16LaneName = "v128.store16_lane"
const OpcodeVecV128Store32LaneName = "v128.store32_lane"
const OpcodeVecV128Store64LaneName = "v128.store64_lane"
const OpcodeVecV128Store8LaneName = "v128.store8_lane"
const OpcodeVecV128StoreName = "v128.store"
const OpcodeVecV128XorName = "v128.xor"
RefTypeExternref represents a reference to a host object, which is not currently supported in wazero.
RefTypeFuncref represents a reference to a function.
SectionIDCustom includes the standard defined NameSection and possibly others not defined in the standard.
TODO: ValueTypeFuncref is not exposed in the api pkg yet.
TODO: ValueTypeV128 is not exposed in the api pkg yet.