wasm

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventFuncResult

type EventFuncResult struct {
	Errno         uint64
	StrPtrEncoded uint64
}

type LogFn

type LogFn func(context.Context, uint32, string) error

type Module

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

func NewModule

func NewModule(ctx context.Context, runtime *Runtime, wasmModule []byte, mainFuncName string, logExt LogFn) (*Module, error)

func (*Module) Close

func (f *Module) Close(ctx context.Context) error

func (*Module) Run

func (f *Module) Run(ctx context.Context, data string) (uint64, string, error)

type ModuleType

type ModuleType uint32
const (
	TypeDefault ModuleType = iota
	TypeRust
)

type Runtime

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

func NewRuntimeWithCompilationCache

func NewRuntimeWithCompilationCache(tempDir string) (*Runtime, error)

func (*Runtime) Close

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

Jump to

Keyboard shortcuts

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