wasm

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

CoreFeatures are the WebAssembly Core specification features our embedded binaries are compiled with.

Variables

This section is empty.

Functions

func Run added in v0.3.0

func Run(
	ctx context.Context,
	runtime wazero.Runtime,
	module wazero.CompiledModule,
	args Args,
) (rc uint32, err error)

Run will run given compiled WebAssembly module within the given runtime, with given arguments. Returns the exit code, or error.

Types

type Args

type Args struct {

	// Optional further module configuration function.
	// (e.g. to mount filesystem dir, set env vars, etc).
	Config func(wazero.ModuleConfig) wazero.ModuleConfig

	// Standard FDs.
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	// CLI args.
	Args []string
}

Args encompasses a common set of configuration options often passed to wazero.Runtime on module instantiation.

Jump to

Keyboard shortcuts

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