wasm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func NewMemory

func NewMemory(mem api.Memory) *Memory

func (*Memory) Read

func (m *Memory) Read(offset uint64, byteCount uint64) ([]byte, bool)

func (*Memory) Write

func (m *Memory) Write(ptr uint64, data []byte) bool

type ModFunc

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

func NewModFunc

func NewModFunc(mod api.Module, name string) *ModFunc

func (*ModFunc) Call

func (f *ModFunc) Call(ctx context.Context, params ...uint64) (uint64, error)

type Runtime

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

func NewRuntime

func NewRuntime(ctx context.Context) (*Runtime, error)

func (*Runtime) BufferFree

func (r *Runtime) BufferFree(ctx context.Context, bufferPtr uint64) error

func (*Runtime) BufferInit

func (r *Runtime) BufferInit(ctx context.Context, bufferPtr uint64) error

func (*Runtime) BufferLength

func (r *Runtime) BufferLength(ctx context.Context, bufferPtr uint64) (uint64, error)

func (*Runtime) BufferSizeOf

func (r *Runtime) BufferSizeOf(ctx context.Context) (uint64, error)

func (*Runtime) BufferValue

func (r *Runtime) BufferValue(ctx context.Context, bufferPtr uint64) (uint64, error)

func (*Runtime) Calloc

func (r *Runtime) Calloc(ctx context.Context, size uint64, count uint64) (uint64, error)

func (*Runtime) Close

func (r *Runtime) Close(ctx context.Context) error

func (*Runtime) Free

func (r *Runtime) Free(ctx context.Context, ptr uint64) error

func (*Runtime) MemoryRead

func (r *Runtime) MemoryRead(offset uint64, byteCount uint64) ([]byte, bool)

func (*Runtime) MemoryWrite

func (r *Runtime) MemoryWrite(ptr uint64, data []byte) bool

func (*Runtime) SerializeParse

func (r *Runtime) SerializeParse(ctx context.Context, bufferPtr, sourcePtr, sourceLen, optPtr uint64) (uint64, error)

Jump to

Keyboard shortcuts

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