Versions in this module Expand all Collapse all v3 v3.0.1 Dec 27, 2023 Changes in this version type ImportObject + func (self *ImportObject) Close() v3.0.0 Dec 23, 2022 Changes in this version + const AnyRef + const CRANELIFT + const DYLIB + const F32 + const F64 + const FUNCTION + const FuncRef + const GLOBAL + const I32 + const I64 + const IMMUTABLE + const JIT + const LLVM + const MEMORY + const MUTABLE + const NATIVE + const SINGLEPASS + const TABLE + const UNIVERSAL + const WASI_VERSION_INVALID + const WASI_VERSION_LATEST + const WASI_VERSION_SNAPSHOT0 + const WASI_VERSION_SNAPSHOT1 + const WasmMaxPages + const WasmMinPages + const WasmPageSize + func DeleteValueVec(vec *C.wasm_val_vec_t) + func IsCompilerAvailable(compiler CompilerKind) bool + func IsEngineAvailable(engine EngineKind) bool + func LimitMaxUnbound() uint32 + func ToValueVec(list []Value) *C.wasm_val_vec_t + 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) UseCraneliftCompiler() *Config + func (self *Config) UseDylibEngine() *Config + func (self *Config) UseJITEngine() *Config + func (self *Config) UseLLVMCompiler() *Config + func (self *Config) UseNativeEngine() *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 NewDylibEngine() *Engine + func NewEngine() *Engine + func NewEngineWithConfig(config *Config) *Engine + func NewJITEngine() *Engine + func NewNativeEngine() *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) Close() + 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) Close() + 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) Close() + 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) GetGasRemaining() uint64 + func (self *Instance) SetGasLimit(gas 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, log *logger.CMLogger) (*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 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(store *Store, module *Module) (*ImportObject, error) + 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() (*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 Other modules containing this package chainmaker.org/chainmaker/vm-wasmer/v2