Help us shape the future of Go! Take the 2026 Go Developer Survey

wasmtools

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

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

Instance is a compiled wazero instance.

func New

func New(ctx context.Context) (*Instance, error)

New creates a new wazero instance.

func (*Instance) Close

func (w *Instance) Close(ctx context.Context) error

Close closes the wazero runtime resource.

func (*Instance) Run

func (w *Instance) Run(ctx context.Context, stdin io.Reader, stdout, stderr io.Writer, fsMap map[string]fs.FS, args ...string) error

Run runs the wasm module with the context, arguments, and optional stdin, stdout, stderr, and filesystem map. Supply a context with a timeout or other cancellation mechanism to control execution time. Returns an error if instantiation fails.

Jump to

Keyboard shortcuts

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