wasmtools

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 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