wasmedge

package
v0.13.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 14

Documentation

Index

Constants

View Source
const (
	// Disable as many optimizations as possible.
	CompilerOptLevel_O0 = CompilerOptimizationLevel(C.WasmEdge_CompilerOptimizationLevel_O0)
	// Optimize quickly without destroying debuggability.
	CompilerOptLevel_O1 = CompilerOptimizationLevel(C.WasmEdge_CompilerOptimizationLevel_O1)
	// Optimize for fast execution as much as possible without triggering significant incremental compile time or code size growth.
	CompilerOptLevel_O2 = CompilerOptimizationLevel(C.WasmEdge_CompilerOptimizationLevel_O2)
	// Optimize for fast execution as much as possible.
	CompilerOptLevel_O3 = CompilerOptimizationLevel(C.WasmEdge_CompilerOptimizationLevel_O3)
	// Optimize for small code size as much as possible without triggering significant incremental compile time or execution time slowdowns.
	CompilerOptLevel_Os = CompilerOptimizationLevel(C.WasmEdge_CompilerOptimizationLevel_Os)
	/// Optimize for small code size as much as possible.
	CompilerOptLevel_Oz = CompilerOptimizationLevel(C.WasmEdge_CompilerOptimizationLevel_Oz)
)
View Source
const (
	/// Native dynamic library format.
	CompilerOutputFormat_Native = CompilerOutputFormat(C.WasmEdge_CompilerOutputFormat_Native)
	/// WebAssembly with AOT compiled codes in custom section.
	CompilerOutputFormat_Wasm = CompilerOutputFormat(C.WasmEdge_CompilerOutputFormat_Wasm)
)
View Source
const (
	ValType_I32       = ValType(C.WasmEdge_ValType_I32)
	ValType_I64       = ValType(C.WasmEdge_ValType_I64)
	ValType_F32       = ValType(C.WasmEdge_ValType_F32)
	ValType_F64       = ValType(C.WasmEdge_ValType_F64)
	ValType_V128      = ValType(C.WasmEdge_ValType_V128)
	ValType_FuncRef   = ValType(C.WasmEdge_ValType_FuncRef)
	ValType_ExternRef = ValType(C.WasmEdge_ValType_ExternRef)
)
View Source
const (
	RefType_FuncRef   = RefType(C.WasmEdge_ValType_FuncRef)
	RefType_ExternRef = RefType(C.WasmEdge_ValType_ExternRef)
)
View Source
const (
	Bindgen_return_void  bindgen = iota
	Bindgen_return_i32   bindgen = iota
	Bindgen_return_i64   bindgen = iota
	Bindgen_return_array bindgen = iota
)

Variables

View Source
var (
	Result_Success   = Result{/* contains filtered or unexported fields */}
	Result_Terminate = Result{/* contains filtered or unexported fields */}
	Result_Fail      = Result{/* contains filtered or unexported fields */}
)

Functions

func GetVersion

func GetVersion() string

func GetVersionMajor

func GetVersionMajor() uint

func GetVersionMinor

func GetVersionMinor() uint

func GetVersionPatch

func GetVersionPatch() uint

func ListPlugins added in v0.12.0

func ListPlugins() []string

func LoadPluginDefaultPaths added in v0.10.1

func LoadPluginDefaultPaths()

func LoadPluginFromPath added in v0.12.0

func LoadPluginFromPath(name string)

func RunWasmEdgeAOTCompilerCLI added in v0.10.1

func RunWasmEdgeAOTCompilerCLI(argv []string) int

func RunWasmEdgeCLI added in v0.10.1

func RunWasmEdgeCLI(argv []string) int

func RunWasmEdgeUnifiedCLI added in v0.13.0

func RunWasmEdgeUnifiedCLI(argv []string) int

func SetLogDebugLevel

func SetLogDebugLevel()

func SetLogErrorLevel

func SetLogErrorLevel()

func SetLogOff added in v0.11.2

func SetLogOff()

Types

type AST

type AST struct {
	// contains filtered or unexported fields
}

func (*AST) ListExports added in v0.9.0

func (self *AST) ListExports() []*ExportType

func (*AST) ListImports added in v0.9.0

func (self *AST) ListImports() []*ImportType

func (*AST) Release added in v0.9.0

func (self *AST) Release()

type Async added in v0.9.1

type Async struct {
	// contains filtered or unexported fields
}

func (*Async) Cancel added in v0.9.1

func (self *Async) Cancel()

func (*Async) GetResult added in v0.9.1

func (self *Async) GetResult() ([]interface{}, error)

func (*Async) Release added in v0.9.1

func (self *Async) Release()

func (*Async) WaitFor added in v0.9.1

func (self *Async) WaitFor(millisec int) bool

type CallingFrame added in v0.11.0

type CallingFrame struct {
	// contains filtered or unexported fields
}

func (*CallingFrame) GetExecutor added in v0.11.0

func (self *CallingFrame) GetExecutor() *Executor

func (*CallingFrame) GetMemoryByIndex added in v0.11.0

func (self *CallingFrame) GetMemoryByIndex(idx int) *Memory

func (*CallingFrame) GetModule added in v0.11.0

func (self *CallingFrame) GetModule() *Module

type Compiler

type Compiler struct {
	// contains filtered or unexported fields
}

func NewCompiler

func NewCompiler() *Compiler

func NewCompilerWithConfig

func NewCompilerWithConfig(conf *Configure) *Compiler

func (*Compiler) Compile

func (self *Compiler) Compile(inpath string, outpath string) error

func (*Compiler) Release added in v0.9.0

func (self *Compiler) Release()

type CompilerOutputFormat added in v0.9.0

type CompilerOutputFormat C.enum_WasmEdge_CompilerOutputFormat

type Configure

type Configure struct {
	// contains filtered or unexported fields
}

func NewConfigure

func NewConfigure(params ...interface{}) *Configure

func (*Configure) AddConfig

func (self *Configure) AddConfig(conf interface{})

func (*Configure) GetCompilerOptimizationLevel

func (self *Configure) GetCompilerOptimizationLevel() CompilerOptimizationLevel

func (*Configure) GetCompilerOutputFormat added in v0.9.0

func (self *Configure) GetCompilerOutputFormat() CompilerOutputFormat

func (*Configure) GetMaxMemoryPage added in v0.9.0

func (self *Configure) GetMaxMemoryPage() uint

func (*Configure) HasConfig

func (self *Configure) HasConfig(conf interface{}) bool

func (*Configure) IsCompilerDumpIR

func (self *Configure) IsCompilerDumpIR() bool

func (*Configure) IsCompilerGenericBinary added in v0.9.0

func (self *Configure) IsCompilerGenericBinary() bool

func (*Configure) IsForceInterpreter added in v0.11.2

func (self *Configure) IsForceInterpreter() bool

func (*Configure) IsStatisticsCostMeasuring added in v0.9.0

func (self *Configure) IsStatisticsCostMeasuring() bool

func (*Configure) IsStatisticsInstructionCounting added in v0.9.0

func (self *Configure) IsStatisticsInstructionCounting() bool

func (*Configure) IsStatisticsTimeMeasuring added in v0.9.0

func (self *Configure) IsStatisticsTimeMeasuring() bool

func (*Configure) Release added in v0.9.0

func (self *Configure) Release()

func (*Configure) RemoveConfig

func (self *Configure) RemoveConfig(conf interface{})

func (*Configure) SetCompilerDumpIR

func (self *Configure) SetCompilerDumpIR(isdump bool)

func (*Configure) SetCompilerGenericBinary added in v0.9.0

func (self *Configure) SetCompilerGenericBinary(isgeneric bool)

func (*Configure) SetCompilerOptimizationLevel

func (self *Configure) SetCompilerOptimizationLevel(level CompilerOptimizationLevel)

func (*Configure) SetCompilerOutputFormat added in v0.9.0

func (self *Configure) SetCompilerOutputFormat(format CompilerOutputFormat)

func (*Configure) SetForceInterpreter added in v0.11.2

func (self *Configure) SetForceInterpreter(isinterpreter bool)

func (*Configure) SetMaxMemoryPage added in v0.9.0

func (self *Configure) SetMaxMemoryPage(pagesize uint)

func (*Configure) SetStatisticsCostMeasuring added in v0.9.0

func (self *Configure) SetStatisticsCostMeasuring(ismeasure bool)

func (*Configure) SetStatisticsInstructionCounting added in v0.9.0

func (self *Configure) SetStatisticsInstructionCounting(iscount bool)

func (*Configure) SetStatisticsTimeMeasuring added in v0.9.0

func (self *Configure) SetStatisticsTimeMeasuring(ismeasure bool)

type ErrCategory added in v0.11.0

type ErrCategory C.enum_WasmEdge_ErrCategory

type Executor added in v0.9.0

type Executor struct {
	// contains filtered or unexported fields
}

func NewExecutor added in v0.9.0

func NewExecutor() *Executor

func NewExecutorWithConfig added in v0.9.0

func NewExecutorWithConfig(conf *Configure) *Executor

func NewExecutorWithConfigAndStatistics added in v0.9.0

func NewExecutorWithConfigAndStatistics(conf *Configure, stat *Statistics) *Executor

func NewExecutorWithStatistics added in v0.9.0

func NewExecutorWithStatistics(stat *Statistics) *Executor

func (*Executor) AsyncInvoke added in v0.13.0

func (self *Executor) AsyncInvoke(funcinst *Function, params ...interface{}) *Async

func (*Executor) Instantiate added in v0.9.0

func (self *Executor) Instantiate(store *Store, ast *AST) (*Module, error)

func (*Executor) Invoke added in v0.9.0

func (self *Executor) Invoke(funcinst *Function, params ...interface{}) ([]interface{}, error)

func (*Executor) Register added in v0.10.0

func (self *Executor) Register(store *Store, ast *AST, modname string) (*Module, error)

func (*Executor) RegisterImport added in v0.9.0

func (self *Executor) RegisterImport(store *Store, module *Module) error

func (*Executor) Release added in v0.9.0

func (self *Executor) Release()

type ExportType added in v0.9.0

type ExportType struct {
	// contains filtered or unexported fields
}

func (*ExportType) GetExternalName added in v0.9.0

func (self *ExportType) GetExternalName() string

func (*ExportType) GetExternalType added in v0.9.0

func (self *ExportType) GetExternalType() ExternType

func (*ExportType) GetExternalValue added in v0.9.0

func (self *ExportType) GetExternalValue() interface{}

type ExternRef

type ExternRef struct {
	// contains filtered or unexported fields
}

func NewExternRef

func NewExternRef(ptr interface{}) ExternRef

func (ExternRef) GetRef

func (self ExternRef) GetRef() interface{}

func (ExternRef) Release

func (self ExternRef) Release()

type ExternType added in v0.9.0

type ExternType C.enum_WasmEdge_ExternalType

type FuncRef

type FuncRef struct {
	// contains filtered or unexported fields
}

func NewFuncRef

func NewFuncRef(funcinst *Function) FuncRef

func (FuncRef) GetRef added in v0.10.0

func (self FuncRef) GetRef() *Function

type Function

type Function struct {
	// contains filtered or unexported fields
}

func NewFunction added in v0.9.0

func NewFunction(ftype *FunctionType, fn hostFunctionSignature, additional interface{}, cost uint) *Function

func (*Function) GetFunctionType

func (self *Function) GetFunctionType() *FunctionType

func (*Function) Release added in v0.9.0

func (self *Function) Release()

type FunctionType

type FunctionType struct {
	// contains filtered or unexported fields
}

func NewFunctionType

func NewFunctionType(params []ValType, returns []ValType) *FunctionType

func (*FunctionType) GetParameters

func (self *FunctionType) GetParameters() []ValType

func (*FunctionType) GetParametersLength added in v0.9.0

func (self *FunctionType) GetParametersLength() uint

func (*FunctionType) GetReturns

func (self *FunctionType) GetReturns() []ValType

func (*FunctionType) GetReturnsLength added in v0.9.0

func (self *FunctionType) GetReturnsLength() uint

func (*FunctionType) Release added in v0.9.0

func (self *FunctionType) Release()

type Global

type Global struct {
	// contains filtered or unexported fields
}

func NewGlobal

func NewGlobal(gtype *GlobalType, val interface{}) *Global

func (*Global) GetGlobalType added in v0.9.0

func (self *Global) GetGlobalType() *GlobalType

func (*Global) GetValue

func (self *Global) GetValue() interface{}

func (*Global) Release added in v0.9.0

func (self *Global) Release()

func (*Global) SetValue

func (self *Global) SetValue(val interface{})

type GlobalType added in v0.9.0

type GlobalType struct {
	// contains filtered or unexported fields
}

func NewGlobalType added in v0.9.0

func NewGlobalType(vtype ValType, vmut ValMut) *GlobalType

func (*GlobalType) GetMutability added in v0.9.0

func (self *GlobalType) GetMutability() ValMut

func (*GlobalType) GetValType added in v0.9.0

func (self *GlobalType) GetValType() ValType

func (*GlobalType) Release added in v0.9.0

func (self *GlobalType) Release()

type ImportType added in v0.9.0

type ImportType struct {
	// contains filtered or unexported fields
}

func (*ImportType) GetExternalName added in v0.9.0

func (self *ImportType) GetExternalName() string

func (*ImportType) GetExternalType added in v0.9.0

func (self *ImportType) GetExternalType() ExternType

func (*ImportType) GetExternalValue added in v0.9.0

func (self *ImportType) GetExternalValue() interface{}

func (*ImportType) GetModuleName added in v0.9.0

func (self *ImportType) GetModuleName() string

type Limit

type Limit struct {
	// contains filtered or unexported fields
}

func NewLimit

func NewLimit(minVal uint) *Limit

func NewLimitShared added in v0.10.1

func NewLimitShared(minVal uint) *Limit

func NewLimitSharedWithMax added in v0.10.1

func NewLimitSharedWithMax(minVal uint, maxVal uint) *Limit

func NewLimitWithMax added in v0.9.0

func NewLimitWithMax(minVal uint, maxVal uint) *Limit

func (*Limit) GetMax added in v0.9.0

func (l *Limit) GetMax() uint

func (*Limit) GetMin added in v0.9.0

func (l *Limit) GetMin() uint

func (*Limit) HasMax added in v0.9.0

func (l *Limit) HasMax() bool

func (*Limit) IsShared added in v0.10.1

func (l *Limit) IsShared() bool

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader() *Loader

func NewLoaderWithConfig

func NewLoaderWithConfig(conf *Configure) *Loader

func (*Loader) LoadBuffer

func (self *Loader) LoadBuffer(buf []byte) (*AST, error)

func (*Loader) LoadFile

func (self *Loader) LoadFile(path string) (*AST, error)

func (*Loader) Release added in v0.9.0

func (self *Loader) Release()

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

func NewMemory

func NewMemory(mtype *MemoryType) *Memory

func (*Memory) GetData

func (self *Memory) GetData(off uint, length uint) ([]byte, error)

func (*Memory) GetMemoryType added in v0.9.0

func (self *Memory) GetMemoryType() *MemoryType

func (*Memory) GetPageSize

func (self *Memory) GetPageSize() uint

func (*Memory) GrowPage

func (self *Memory) GrowPage(size uint) error

func (*Memory) Release added in v0.9.0

func (self *Memory) Release()

func (*Memory) SetData

func (self *Memory) SetData(data []byte, off uint, length uint) error

type MemoryType added in v0.9.0

type MemoryType struct {
	// contains filtered or unexported fields
}

func NewMemoryType added in v0.9.0

func NewMemoryType(lim *Limit) *MemoryType

func (*MemoryType) GetLimit added in v0.9.0

func (self *MemoryType) GetLimit() *Limit

func (*MemoryType) Release added in v0.9.0

func (self *MemoryType) Release()

type Module added in v0.10.0

type Module struct {
	// contains filtered or unexported fields
}

func NewModule added in v0.10.0

func NewModule(modname string) *Module

func NewWasiModule added in v0.10.0

func NewWasiModule(args []string, envs []string, preopens []string) *Module

func (*Module) AddFunction added in v0.10.0

func (self *Module) AddFunction(name string, inst *Function)

func (*Module) AddGlobal added in v0.10.0

func (self *Module) AddGlobal(name string, inst *Global)

func (*Module) AddMemory added in v0.10.0

func (self *Module) AddMemory(name string, inst *Memory)

func (*Module) AddTable added in v0.10.0

func (self *Module) AddTable(name string, inst *Table)

func (*Module) FindFunction added in v0.10.0

func (self *Module) FindFunction(name string) *Function

func (*Module) FindGlobal added in v0.10.0

func (self *Module) FindGlobal(name string) *Global

func (*Module) FindMemory added in v0.10.0

func (self *Module) FindMemory(name string) *Memory

func (*Module) FindTable added in v0.10.0

func (self *Module) FindTable(name string) *Table

func (*Module) GetName added in v0.12.0

func (self *Module) GetName() string

func (*Module) InitWasi added in v0.10.0

func (self *Module) InitWasi(args []string, envs []string, preopens []string)

func (*Module) InitWasmEdgeProcess added in v0.10.0

func (self *Module) InitWasmEdgeProcess(allowedcmds []string, allowall bool)

func (*Module) ListFunction added in v0.10.0

func (self *Module) ListFunction() []string

func (*Module) ListGlobal added in v0.10.0

func (self *Module) ListGlobal() []string

func (*Module) ListMemory added in v0.10.0

func (self *Module) ListMemory() []string

func (*Module) ListTable added in v0.10.0

func (self *Module) ListTable() []string

func (*Module) Release added in v0.10.0

func (self *Module) Release()

func (*Module) WasiGetExitCode added in v0.10.0

func (self *Module) WasiGetExitCode() uint

type Plugin added in v0.12.0

type Plugin struct {
	// contains filtered or unexported fields
}

func FindPlugin added in v0.12.0

func FindPlugin(name string) *Plugin

func (*Plugin) CreateModule added in v0.12.0

func (self *Plugin) CreateModule(name string) *Module

func (*Plugin) ListModule added in v0.12.0

func (self *Plugin) ListModule() []string

type Proposal

type Proposal C.enum_WasmEdge_Proposal

type RefType

type RefType C.enum_WasmEdge_RefType

func (RefType) String

func (self RefType) String() string

type Result

type Result struct {
	// contains filtered or unexported fields
}

func NewResult added in v0.11.0

func NewResult(cate ErrCategory, code int) Result

func (*Result) Error

func (res *Result) Error() string

func (*Result) GetCode added in v0.11.0

func (res *Result) GetCode() int

func (*Result) GetErrorCategory added in v0.11.0

func (res *Result) GetErrorCategory() ErrCategory

type Statistics

type Statistics struct {
	// contains filtered or unexported fields
}

func NewStatistics

func NewStatistics() *Statistics

func (*Statistics) GetInstrCount

func (self *Statistics) GetInstrCount() uint

func (*Statistics) GetInstrPerSecond

func (self *Statistics) GetInstrPerSecond() float64

func (*Statistics) GetTotalCost

func (self *Statistics) GetTotalCost() uint

func (*Statistics) Release added in v0.9.0

func (self *Statistics) Release()

func (*Statistics) SetCostLimit

func (self *Statistics) SetCostLimit(limit uint)

func (*Statistics) SetCostTable

func (self *Statistics) SetCostTable(table []uint64)

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Store

func (*Store) FindModule added in v0.10.0

func (self *Store) FindModule(name string) *Module

func (*Store) ListModule

func (self *Store) ListModule() []string

func (*Store) Release added in v0.9.0

func (self *Store) Release()

type Table

type Table struct {
	// contains filtered or unexported fields
}

func NewTable

func NewTable(ttype *TableType) *Table

func (*Table) GetData

func (self *Table) GetData(off uint) (interface{}, error)

func (*Table) GetSize

func (self *Table) GetSize() uint

func (*Table) GetTableType added in v0.9.0

func (self *Table) GetTableType() *TableType

func (*Table) Grow

func (self *Table) Grow(size uint) error

func (*Table) Release added in v0.9.0

func (self *Table) Release()

func (*Table) SetData

func (self *Table) SetData(data interface{}, off uint) error

type TableType added in v0.9.0

type TableType struct {
	// contains filtered or unexported fields
}

func NewTableType added in v0.9.0

func NewTableType(rtype RefType, lim *Limit) *TableType

func (*TableType) GetLimit added in v0.9.0

func (self *TableType) GetLimit() *Limit

func (*TableType) GetRefType added in v0.9.0

func (self *TableType) GetRefType() RefType

func (*TableType) Release added in v0.9.0

func (self *TableType) Release()

type V128

type V128 struct {
	// contains filtered or unexported fields
}

func NewV128

func NewV128(high uint64, low uint64) V128

func (V128) GetVal

func (self V128) GetVal() (uint64, uint64)

type VM

type VM struct {
	// contains filtered or unexported fields
}

func NewVM

func NewVM() *VM

func NewVMWithConfig

func NewVMWithConfig(conf *Configure) *VM

func NewVMWithConfigAndStore

func NewVMWithConfigAndStore(conf *Configure, store *Store) *VM

func NewVMWithStore

func NewVMWithStore(store *Store) *VM

func (*VM) AsyncExecute added in v0.9.1

func (self *VM) AsyncExecute(funcname string, params ...interface{}) *Async

func (*VM) AsyncExecuteRegistered added in v0.9.1

func (self *VM) AsyncExecuteRegistered(modname string, funcname string, params ...interface{}) *Async

func (*VM) AsyncRunWasmAST added in v0.9.1

func (self *VM) AsyncRunWasmAST(ast *AST, funcname string, params ...interface{}) *Async

func (*VM) AsyncRunWasmBuffer added in v0.9.1

func (self *VM) AsyncRunWasmBuffer(buf []byte, funcname string, params ...interface{}) *Async

func (*VM) AsyncRunWasmFile added in v0.9.1

func (self *VM) AsyncRunWasmFile(path string, funcname string, params ...interface{}) *Async

func (*VM) Cleanup

func (self *VM) Cleanup()

func (*VM) Execute

func (self *VM) Execute(funcname string, params ...interface{}) ([]interface{}, error)

func (*VM) ExecuteBindgen

func (self *VM) ExecuteBindgen(funcname string, rettype bindgen, params ...interface{}) (interface{}, error)

Special execute function for running with wasm-bindgen.

func (*VM) ExecuteBindgenRegistered

func (self *VM) ExecuteBindgenRegistered(modname string, funcname string, rettype bindgen, params ...interface{}) (interface{}, error)

Special execute function for running with wasm-bindgen.

func (*VM) ExecuteRegistered

func (self *VM) ExecuteRegistered(modname string, funcname string, params ...interface{}) ([]interface{}, error)

func (*VM) GetActiveModule added in v0.10.0

func (self *VM) GetActiveModule() *Module

func (*VM) GetExecutor added in v0.10.1

func (self *VM) GetExecutor() *Executor

func (*VM) GetFunctionList

func (self *VM) GetFunctionList() ([]string, []*FunctionType)

func (*VM) GetFunctionType

func (self *VM) GetFunctionType(funcname string) *FunctionType

func (*VM) GetFunctionTypeRegistered

func (self *VM) GetFunctionTypeRegistered(modname string, funcname string) *FunctionType

func (*VM) GetImportModule added in v0.10.0

func (self *VM) GetImportModule(host HostRegistration) *Module

func (*VM) GetLoader added in v0.10.1

func (self *VM) GetLoader() *Loader

func (*VM) GetRegisteredModule added in v0.12.0

func (self *VM) GetRegisteredModule(name string) *Module

func (*VM) GetStatistics

func (self *VM) GetStatistics() *Statistics

func (*VM) GetStore

func (self *VM) GetStore() *Store

func (*VM) GetValidator added in v0.10.1

func (self *VM) GetValidator() *Validator

func (*VM) Instantiate

func (self *VM) Instantiate() error

func (*VM) ListRegisteredModule added in v0.12.0

func (self *VM) ListRegisteredModule() []string

func (*VM) LoadWasmAST

func (self *VM) LoadWasmAST(ast *AST) error

func (*VM) LoadWasmBuffer

func (self *VM) LoadWasmBuffer(buf []byte) error

func (*VM) LoadWasmFile

func (self *VM) LoadWasmFile(path string) error

func (*VM) RegisterAST

func (self *VM) RegisterAST(modname string, ast *AST) error

func (*VM) RegisterModule added in v0.10.0

func (self *VM) RegisterModule(module *Module) error

func (*VM) RegisterWasmBuffer

func (self *VM) RegisterWasmBuffer(modname string, buf []byte) error

func (*VM) RegisterWasmFile

func (self *VM) RegisterWasmFile(modname string, path string) error

func (*VM) Release added in v0.9.0

func (self *VM) Release()

func (*VM) RunWasmAST

func (self *VM) RunWasmAST(ast *AST, funcname string, params ...interface{}) ([]interface{}, error)

func (*VM) RunWasmBuffer

func (self *VM) RunWasmBuffer(buf []byte, funcname string, params ...interface{}) ([]interface{}, error)

func (*VM) RunWasmFile

func (self *VM) RunWasmFile(path string, funcname string, params ...interface{}) ([]interface{}, error)

func (*VM) Validate

func (self *VM) Validate() error

type ValMut

func (ValMut) String

func (self ValMut) String() string

type ValType

type ValType C.enum_WasmEdge_ValType

func (ValType) String

func (self ValType) String() string

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator() *Validator

func NewValidatorWithConfig

func NewValidatorWithConfig(conf *Configure) *Validator

func (*Validator) Release added in v0.9.0

func (self *Validator) Release()

func (*Validator) Validate

func (self *Validator) Validate(ast *AST) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL