Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeULeb128(value []byte) uint32
- func LoadCustomSections(data []byte) (map[string]CustomSection, int, error)
- func NewWasmtimeInstance(vm *VM, mod *Module) wasm.Instance
- func NewWasmtimeModule(vm *VM, mod *wasmtime.Module, code []byte) (wasm.Module, error)
- func NewWasmtimeVM(id string) wasm.VM
- func ReadULEB128(data []byte) (int, int)
- type CustomSection
- type DwarfInfo
- type Instance
- func (i *Instance) Acquire() bool
- func (i *Instance) GetByte(addr uint64) (byte, error)
- func (i *Instance) GetExportsFunc(name string) (wasm.Function, error)
- func (i *Instance) GetExportsMem(name string) ([]byte, error)
- func (i *Instance) GetMemory(addr, size uint64) ([]byte, error)
- func (i *Instance) GetModule() wasm.Module
- func (i *Instance) GetUint32(addr uint64) (uint32, error)
- func (i *Instance) GetUserdata() any
- func (i *Instance) HandleError(err error)
- func (i *Instance) ID() string
- func (i *Instance) Lock(data any)
- func (i *Instance) Malloc(size int32) (uint64, error)
- func (i *Instance) PutByte(addr uint64, v byte) error
- func (i *Instance) PutMemory(addr, size uint64, mem []byte) error
- func (i *Instance) PutUint32(addr uint64, v uint32) error
- func (i *Instance) RegisterImports(name string) error
- func (i *Instance) Release()
- func (i *Instance) SetUserdata(data any)
- func (i *Instance) Start() error
- func (i *Instance) Stop()
- func (i *Instance) Unlock()
- type Module
- type VM
Constants ¶
Variables ¶
Functions ¶
func DecodeULeb128 ¶
DecodeULeb128 decodes an unsigned LEB128 value to an unsigned int32 value. Returns the result as a uint32.
func LoadCustomSections ¶
func LoadCustomSections(data []byte) (map[string]CustomSection, int, error)
func NewWasmtimeModule ¶
NewWasmtimeModule
func ReadULEB128 ¶
ReadULEB128 read a uLEB128 at the starting position. Returns (number read, number of bytes read).
Types ¶
type CustomSection ¶
type CustomSection struct {
// contains filtered or unexported fields
}
func NewCustomSection ¶
func NewCustomSection(data []byte) CustomSection
NewCustomSection properly read name and data from a custom section.
type DwarfInfo ¶
type DwarfInfo struct {
// contains filtered or unexported fields
}
func ParseDwarf ¶
func (*DwarfInfo) GetLineReader ¶
func (d *DwarfInfo) GetLineReader() *dwarf.LineReader
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func (*Instance) GetExportsFunc ¶
func (*Instance) GetUserdata ¶
func (*Instance) HandleError ¶
func (*Instance) RegisterImports ¶
func (*Instance) SetUserdata ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GetABINameList ¶
func (*Module) NewInstance ¶
Click to show internal directories.
Click to hide internal directories.