Versions in this module Expand all Collapse all v0 v0.1.1 May 16, 2023 Changes in this version + const AnyRef + const AtomicFence + const Block + const Br + const BrIf + const BrTable + const CRANELIFT + const Call + const CallIndirect + const Catch + const CatchAll + const DataDrop + const Delegate + const Drop + const ElemDrop + const Else + const End + const F32 + const F32Abs + const F32Add + const F32Ceil + const F32Const + const F32ConvertI32S + const F32ConvertI32U + const F32ConvertI64S + const F32ConvertI64U + const F32Copysign + const F32DemoteF64 + const F32Div + const F32Eq + const F32Floor + const F32Ge + const F32Gt + const F32Le + const F32Load + const F32Lt + const F32Max + const F32Min + const F32Mul + const F32Ne + const F32Nearest + const F32Neg + const F32ReinterpretI32 + const F32Sqrt + const F32Store + const F32Sub + const F32Trunc + const F32x4Abs + const F32x4Add + const F32x4Ceil + const F32x4ConvertI32x4S + const F32x4ConvertI32x4U + const F32x4DemoteF64x2Zero + const F32x4Div + const F32x4Eq + const F32x4ExtractLane + const F32x4Floor + const F32x4Ge + const F32x4Gt + const F32x4Le + const F32x4Lt + const F32x4Max + const F32x4Min + const F32x4Mul + const F32x4Ne + const F32x4Nearest + const F32x4Neg + const F32x4PMax + const F32x4PMin + const F32x4ReplaceLane + const F32x4Splat + const F32x4Sqrt + const F32x4Sub + const F32x4Trunc + const F64 + const F64Abs + const F64Add + const F64Ceil + const F64Const + const F64ConvertI32S + const F64ConvertI32U + const F64ConvertI64S + const F64ConvertI64U + const F64Copysign + const F64Div + const F64Eq + const F64Floor + const F64Ge + const F64Gt + const F64Le + const F64Load + const F64Lt + const F64Max + const F64Min + const F64Mul + const F64Ne + const F64Nearest + const F64Neg + const F64PromoteF32 + const F64ReinterpretI64 + const F64Sqrt + const F64Store + const F64Sub + const F64Trunc + const F64x2Abs + const F64x2Add + const F64x2Ceil + const F64x2ConvertLowI32x4S + const F64x2ConvertLowI32x4U + const F64x2Div + const F64x2Eq + const F64x2ExtractLane + const F64x2Floor + const F64x2Ge + const F64x2Gt + const F64x2Le + const F64x2Lt + const F64x2Max + const F64x2Min + const F64x2Mul + const F64x2Ne + const F64x2Nearest + const F64x2Neg + const F64x2PMax + const F64x2PMin + const F64x2PromoteLowF32x4 + const F64x2ReplaceLane + const F64x2Splat + const F64x2Sqrt + const F64x2Sub + const F64x2Trunc + const FUNCTION + const FuncRef + const GLOBAL + const GlobalGet + const GlobalSet + const I16x8Abs + const I16x8Add + const I16x8AddSatS + const I16x8AddSatU + const I16x8AllTrue + const I16x8Bitmask + const I16x8Eq + const I16x8ExtAddPairwiseI8x16S + const I16x8ExtAddPairwiseI8x16U + const I16x8ExtMulHighI8x16S + const I16x8ExtMulHighI8x16U + const I16x8ExtMulLowI8x16S + const I16x8ExtMulLowI8x16U + const I16x8ExtendHighI8x16S + const I16x8ExtendHighI8x16U + const I16x8ExtendLowI8x16S + const I16x8ExtendLowI8x16U + const I16x8ExtractLaneS + const I16x8ExtractLaneU + const I16x8GeS + const I16x8GeU + const I16x8GtS + const I16x8GtU + const I16x8LeS + const I16x8LeU + const I16x8LtS + const I16x8LtU + const I16x8MaxS + const I16x8MaxU + const I16x8MinS + const I16x8MinU + const I16x8Mul + const I16x8NarrowI32x4S + const I16x8NarrowI32x4U + const I16x8Ne + const I16x8Neg + const I16x8Q15MulrSatS + const I16x8ReplaceLane + const I16x8RoundingAverageU + const I16x8Shl + const I16x8ShrS + const I16x8ShrU + const I16x8Splat + const I16x8Sub + const I16x8SubSatS + const I16x8SubSatU + const I32 + const I32Add + const I32And + const I32AtomicLoad + const I32AtomicLoad16U + const I32AtomicLoad8U + const I32AtomicRmw16AddU + const I32AtomicRmw16AndU + const I32AtomicRmw16CmpxchgU + const I32AtomicRmw16OrU + const I32AtomicRmw16SubU + const I32AtomicRmw16XchgU + const I32AtomicRmw16XorU + const I32AtomicRmw8AddU + const I32AtomicRmw8AndU + const I32AtomicRmw8CmpxchgU + const I32AtomicRmw8OrU + const I32AtomicRmw8SubU + const I32AtomicRmw8XchgU + const I32AtomicRmw8XorU + const I32AtomicRmwAdd + const I32AtomicRmwAnd + const I32AtomicRmwCmpxchg + const I32AtomicRmwOr + const I32AtomicRmwSub + const I32AtomicRmwXchg + const I32AtomicRmwXor + const I32AtomicStore + const I32AtomicStore16 + const I32AtomicStore8 + const I32Clz + const I32Const + const I32Ctz + const I32DivS + const I32DivU + const I32Eq + const I32Eqz + const I32Extend16S + const I32Extend8S + const I32GeS + const I32GeU + const I32GtS + const I32GtU + const I32LeS + const I32LeU + const I32Load + const I32Load16S + const I32Load16U + const I32Load8S + const I32Load8U + const I32LtS + const I32LtU + const I32Mul + const I32Ne + const I32Or + const I32Popcnt + const I32ReinterpretF32 + const I32RemS + const I32RemU + const I32Rotl + const I32Rotr + const I32Shl + const I32ShrS + const I32ShrU + const I32Store + const I32Store16 + const I32Store8 + const I32Sub + const I32TruncF32S + const I32TruncF32U + const I32TruncF64S + const I32TruncF64U + const I32TruncSatF32S + const I32TruncSatF32U + const I32TruncSatF64S + const I32TruncSatF64U + const I32WrapI64 + const I32Xor + const I32x4Abs + const I32x4Add + const I32x4AllTrue + const I32x4Bitmask + const I32x4DotI16x8S + const I32x4Eq + const I32x4ExtAddPairwiseI16x8S + const I32x4ExtAddPairwiseI16x8U + const I32x4ExtMulHighI16x8S + const I32x4ExtMulHighI16x8U + const I32x4ExtMulLowI16x8S + const I32x4ExtMulLowI16x8U + const I32x4ExtendHighI16x8S + const I32x4ExtendHighI16x8U + const I32x4ExtendLowI16x8S + const I32x4ExtendLowI16x8U + const I32x4ExtractLane + const I32x4GeS + const I32x4GeU + const I32x4GtS + const I32x4GtU + const I32x4LeS + const I32x4LeU + const I32x4LtS + const I32x4LtU + const I32x4MaxS + const I32x4MaxU + const I32x4MinS + const I32x4MinU + const I32x4Mul + const I32x4Ne + const I32x4Neg + const I32x4ReplaceLane + const I32x4Shl + const I32x4ShrS + const I32x4ShrU + const I32x4Splat + const I32x4Sub + const I32x4TruncSatF32x4S + const I32x4TruncSatF32x4U + const I32x4TruncSatF64x2SZero + const I32x4TruncSatF64x2UZero + const I64 + const I64Add + const I64And + const I64AtomicLoad + const I64AtomicLoad16U + const I64AtomicLoad32U + const I64AtomicLoad8U + const I64AtomicRmw16AddU + const I64AtomicRmw16AndU + const I64AtomicRmw16CmpxchgU + const I64AtomicRmw16OrU + const I64AtomicRmw16SubU + const I64AtomicRmw16XchgU + const I64AtomicRmw16XorU + const I64AtomicRmw32AddU + const I64AtomicRmw32AndU + const I64AtomicRmw32CmpxchgU + const I64AtomicRmw32OrU + const I64AtomicRmw32SubU + const I64AtomicRmw32XchgU + const I64AtomicRmw32XorU + const I64AtomicRmw8AddU + const I64AtomicRmw8AndU + const I64AtomicRmw8CmpxchgU + const I64AtomicRmw8OrU + const I64AtomicRmw8SubU + const I64AtomicRmw8XchgU + const I64AtomicRmw8XorU + const I64AtomicRmwAdd + const I64AtomicRmwAnd + const I64AtomicRmwCmpxchg + const I64AtomicRmwOr + const I64AtomicRmwSub + const I64AtomicRmwXchg + const I64AtomicRmwXor + const I64AtomicStore + const I64AtomicStore16 + const I64AtomicStore32 + const I64AtomicStore8 + const I64Clz + const I64Const + const I64Ctz + const I64DivS + const I64DivU + const I64Eq + const I64Eqz + const I64Extend16S + const I64Extend32S + const I64Extend8S + const I64ExtendI32S + const I64ExtendI32U + const I64GeS + const I64GeU + const I64GtS + const I64GtU + const I64LeS + const I64LeU + const I64Load + const I64Load16S + const I64Load16U + const I64Load32S + const I64Load32U + const I64Load8S + const I64Load8U + const I64LtS + const I64LtU + const I64Mul + const I64Ne + const I64Or + const I64Popcnt + const I64ReinterpretF64 + const I64RemS + const I64RemU + const I64Rotl + const I64Rotr + const I64Shl + const I64ShrS + const I64ShrU + const I64Store + const I64Store16 + const I64Store32 + const I64Store8 + const I64Sub + const I64TruncF32S + const I64TruncF32U + const I64TruncF64S + const I64TruncF64U + const I64TruncSatF32S + const I64TruncSatF32U + const I64TruncSatF64S + const I64TruncSatF64U + const I64Xor + const I64x2Abs + const I64x2Add + const I64x2AllTrue + const I64x2Bitmask + const I64x2Eq + const I64x2ExtMulHighI32x4S + const I64x2ExtMulHighI32x4U + const I64x2ExtMulLowI32x4S + const I64x2ExtMulLowI32x4U + const I64x2ExtendHighI32x4S + const I64x2ExtendHighI32x4U + const I64x2ExtendLowI32x4S + const I64x2ExtendLowI32x4U + const I64x2ExtractLane + const I64x2GeS + const I64x2GtS + const I64x2LeS + const I64x2LtS + const I64x2Mul + const I64x2Ne + const I64x2Neg + const I64x2ReplaceLane + const I64x2Shl + const I64x2ShrS + const I64x2ShrU + const I64x2Splat + const I64x2Sub + const I8x16Abs + const I8x16Add + const I8x16AddSatS + const I8x16AddSatU + const I8x16AllTrue + const I8x16Bitmask + const I8x16Eq + const I8x16ExtractLaneS + const I8x16ExtractLaneU + const I8x16GeS + const I8x16GeU + const I8x16GtS + const I8x16GtU + const I8x16LeS + const I8x16LeU + const I8x16LtS + const I8x16LtU + const I8x16MaxS + const I8x16MaxU + const I8x16MinS + const I8x16MinU + const I8x16NarrowI16x8S + const I8x16NarrowI16x8U + const I8x16Ne + const I8x16Neg + const I8x16Popcnt + const I8x16ReplaceLane + const I8x16RoundingAverageU + const I8x16Shl + const I8x16ShrS + const I8x16ShrU + const I8x16Shuffle + const I8x16Splat + const I8x16Sub + const I8x16SubSatS + const I8x16SubSatU + const I8x16Swizzle + const IMMUTABLE + const If + const LLVM + const LocalGet + const LocalSet + const LocalTee + const Loop + const MEMORY + const MUTABLE + const MemoryAtomicNotify + const MemoryAtomicWait32 + const MemoryAtomicWait64 + const MemoryCopy + const MemoryFill + const MemoryGrow + const MemoryInit + const MemorySize + const Nop + const OpTableSize + const RefFunc + const RefIsNull + const RefNull + const Rethrow + const Return + const ReturnCall + const ReturnCallIndirect + const SINGLEPASS + const Select + const TABLE + const TableCopy + const TableFill + const TableGet + const TableGrow + const TableInit + const TableSet + const Throw + const Try + const TypedSelect + const UNIVERSAL + const Unreachable + const Unwind + const V128And + const V128AndNot + const V128AnyTrue + const V128Bitselect + const V128Const + const V128Load + const V128Load16Lane + const V128Load16Splat + const V128Load16x4S + const V128Load16x4U + const V128Load32Lane + const V128Load32Splat + const V128Load32Zero + const V128Load32x2S + const V128Load32x2U + const V128Load64Lane + const V128Load64Splat + const V128Load64Zero + const V128Load8Lane + const V128Load8Splat + const V128Load8x8S + const V128Load8x8U + const V128Not + const V128Or + const V128Store + const V128Store16Lane + const V128Store32Lane + const V128Store64Lane + const V128Store8Lane + const V128Xor + const WASI_VERSION_INVALID + const WASI_VERSION_LATEST + const WASI_VERSION_SNAPSHOT0 + const WASI_VERSION_SNAPSHOT1 + const WasmMaxPages + const WasmMinPages + const WasmPageSize + func IsCompilerAvailable(compiler CompilerKind) bool + func IsEngineAvailable(engine EngineKind) bool + func LimitMaxUnbound() uint32 + func ValidateModule(store *Store, bytes []byte) error + func Wat2Wasm(wat string) ([]byte, error) + type CompilerKind C.wasmer_compiler_t + func (self CompilerKind) String() string + type Config struct + func NewConfig() *Config + func (self *Config) PushMeteringMiddleware(maxGasUsageAllowed uint64, opMap map[Opcode]uint32) *Config + func (self *Config) PushMeteringMiddlewarePtr(maxGasUsageAllowed uint64, p unsafe.Pointer) *Config + func (self *Config) UseCraneliftCompiler() *Config + func (self *Config) UseLLVMCompiler() *Config + func (self *Config) UseSinglepassCompiler() *Config + func (self *Config) UseTarget(target *Target) *Config + func (self *Config) UseUniversalEngine() *Config + type CpuFeatures struct + func NewCpuFeatures() *CpuFeatures + func (self *CpuFeatures) Add(feature string) error + type Engine struct + func NewEngine() *Engine + func NewEngineWithConfig(config *Config) *Engine + func NewUniversalEngine() *Engine + type EngineKind C.wasmer_engine_t + func (self EngineKind) String() string + type Error struct + func (error *Error) Error() string + type ExportType struct + func NewExportType(name string, ty IntoExternType) *ExportType + func (self *ExportType) Close() + func (self *ExportType) Name() string + func (self *ExportType) Type() *ExternType + type Exports struct + func (self *Exports) Close() + func (self *Exports) Get(name string) (*Extern, error) + func (self *Exports) GetFunction(name string) (NativeFunction, error) + func (self *Exports) GetGlobal(name string) (*Global, error) + func (self *Exports) GetMemory(name string) (*Memory, error) + func (self *Exports) GetRawFunction(name string) (*Function, error) + func (self *Exports) GetTable(name string) (*Table, error) + func (self *Exports) GetWasiStartFunction() (NativeFunction, error) + type Extern struct + func (self *Extern) IntoExtern() *Extern + func (self *Extern) IntoFunction() *Function + func (self *Extern) IntoGlobal() *Global + func (self *Extern) IntoMemory() *Memory + func (self *Extern) IntoTable() *Table + func (self *Extern) Kind() ExternKind + func (self *Extern) Type() *ExternType + type ExternKind C.wasm_externkind_t + func (self ExternKind) String() string + type ExternType struct + func (self *ExternType) IntoFunctionType() *FunctionType + func (self *ExternType) IntoGlobalType() *GlobalType + func (self *ExternType) IntoMemoryType() *MemoryType + func (self *ExternType) IntoTableType() *TableType + func (self *ExternType) Kind() ExternKind + type Frame struct + func (self *Frame) FunctionIndex() uint32 + func (self *Frame) FunctionOffset() uint + func (self *Frame) Instance() + func (self *Frame) ModuleOffset() uint + type Function struct + func NewFunction(store *Store, ty *FunctionType, function func([]Value) ([]Value, error)) *Function + func NewFunctionWithEnvironment(store *Store, ty *FunctionType, userEnvironment interface{}, ...) *Function + func (self *Function) Call(parameters ...interface{}) (interface{}, error) + func (self *Function) IntoExtern() *Extern + func (self *Function) Native() NativeFunction + func (self *Function) ParameterArity() uint + func (self *Function) ResultArity() uint + func (self *Function) Type() *FunctionType + type FunctionType struct + func NewFunctionType(params []*ValueType, results []*ValueType) *FunctionType + func (self *FunctionType) IntoExternType() *ExternType + func (self *FunctionType) Params() []*ValueType + func (self *FunctionType) Results() []*ValueType + type Global struct + func NewGlobal(store *Store, ty *GlobalType, value Value) *Global + func (self *Global) Get() (interface{}, error) + func (self *Global) IntoExtern() *Extern + func (self *Global) Set(value interface{}, kind ValueKind) error + func (self *Global) Type() *GlobalType + type GlobalMutability C.wasm_mutability_t + func (self GlobalMutability) String() string + type GlobalType struct + func NewGlobalType(valueType *ValueType, mutability GlobalMutability) *GlobalType + func (self *GlobalType) IntoExternType() *ExternType + func (self *GlobalType) Mutability() GlobalMutability + func (self *GlobalType) ValueType() *ValueType + type ImportObject struct + func NewImportObject() *ImportObject + func (self *ImportObject) ContainsNamespace(name string) bool + func (self *ImportObject) Register(namespaceName string, namespace map[string]IntoExtern) + type ImportType struct + func NewImportType(module string, name string, ty IntoExternType) *ImportType + func (self *ImportType) Close() + func (self *ImportType) Module() string + func (self *ImportType) Name() string + func (self *ImportType) Type() *ExternType + type Instance struct + Exports *Exports + func NewInstance(module *Module, imports *ImportObject) (*Instance, error) + func (self *Instance) Close() + func (self *Instance) GetRemainingPoints() uint64 + func (self *Instance) MeteringPointsExhausted() bool + func (self *Instance) SetRemainingPoints(newLimit uint64) + type IntoExtern interface + IntoExtern func() *Extern + type IntoExternType interface + IntoExternType func() *ExternType + type Limits struct + func NewLimits(minimum uint32, maximum uint32) (*Limits, error) + func (self *Limits) Maximum() uint32 + func (self *Limits) Minimum() uint32 + type Memory struct + func NewMemory(store *Store, ty *MemoryType) *Memory + func (self *Memory) Data() []byte + func (self *Memory) DataSize() uint + func (self *Memory) Grow(delta Pages) bool + func (self *Memory) IntoExtern() *Extern + func (self *Memory) Size() Pages + func (self *Memory) Type() *MemoryType + type MemoryType struct + func NewMemoryType(limits *Limits) *MemoryType + func (self *MemoryType) IntoExternType() *ExternType + func (self *MemoryType) Limits() *Limits + type Module struct + func DeserializeModule(store *Store, bytes []byte) (*Module, error) + func NewModule(store *Store, bytes []byte) (*Module, error) + func (self *Module) Close() + func (self *Module) Exports() []*ExportType + func (self *Module) Imports() []*ImportType + func (self *Module) Name() string + func (self *Module) Serialize() ([]byte, error) + type NativeFunction = func(...interface{}) (interface{}, error) + type Opcode C.wasmer_parser_operator_t + type Pages C.wasm_memory_pages_t + func (self *Pages) ToBytes() uint + func (self *Pages) ToUint32() uint32 + type Store struct + Engine *Engine + func NewStore(engine *Engine) *Store + func (self *Store) Close() + type Table struct + func (self *Table) IntoExtern() *Extern + func (self *Table) Size() TableSize + type TableSize C.wasm_table_size_t + func (self *TableSize) ToUint32() uint32 + type TableType struct + func NewTableType(valueType *ValueType, limits *Limits) *TableType + func (self *TableType) IntoExternType() *ExternType + func (self *TableType) Limits() *Limits + func (self *TableType) ValueType() *ValueType + type Target struct + func NewTarget(triple *Triple, cpuFeatures *CpuFeatures) *Target + type Trace struct + type Trap struct + func NewTrap(store *Store, message string) *Trap + func (self *Trap) Message() string + func (self *Trap) Origin() *Frame + func (self *Trap) Trace() *Trace + type TrapError struct + func (self *TrapError) Error() string + func (self *TrapError) Origin() *Frame + func (self *TrapError) Trace() []*Frame + type Triple struct + func NewTriple(triple string) (*Triple, error) + func NewTripleFromHost() *Triple + type Value struct + func NewF32(value interface{}) Value + func NewF64(value interface{}) Value + func NewI32(value interface{}) Value + func NewI64(value interface{}) Value + func NewValue(value interface{}, kind ValueKind) Value + func (self *Value) F32() float32 + func (self *Value) F64() float64 + func (self *Value) I32() int32 + func (self *Value) I64() int64 + func (self *Value) Kind() ValueKind + func (self *Value) Unwrap() interface{} + type ValueKind C.wasm_valkind_t + func (self ValueKind) IsNumber() bool + func (self ValueKind) IsReference() bool + func (self ValueKind) String() string + type ValueType struct + func NewValueType(kind ValueKind) *ValueType + func NewValueTypes(kinds ...ValueKind) []*ValueType + func (self *ValueType) Kind() ValueKind + type WasiEnvironment struct + func (self *WasiEnvironment) GenerateImportObject(module *Module) (*ImportObject, error) + func (self *WasiEnvironment) ReadStderr() []byte + func (self *WasiEnvironment) ReadStdout() []byte + type WasiStateBuilder struct + func NewWasiStateBuilder(programName string) *WasiStateBuilder + func (self *WasiStateBuilder) Argument(argument string) *WasiStateBuilder + func (self *WasiStateBuilder) CaptureStderr() *WasiStateBuilder + func (self *WasiStateBuilder) CaptureStdout() *WasiStateBuilder + func (self *WasiStateBuilder) Environment(key string, value string) *WasiStateBuilder + func (self *WasiStateBuilder) Finalize(store *Store) (*WasiEnvironment, error) + func (self *WasiStateBuilder) InheritStderr() *WasiStateBuilder + func (self *WasiStateBuilder) InheritStdin() *WasiStateBuilder + func (self *WasiStateBuilder) InheritStdout() *WasiStateBuilder + func (self *WasiStateBuilder) MapDirectory(alias string, directory string) *WasiStateBuilder + func (self *WasiStateBuilder) PreopenDirectory(preopenDirectory string) *WasiStateBuilder + type WasiVersion C.wasi_version_t + func GetWasiVersion(module *Module) WasiVersion + func (self WasiVersion) String() string