wasm

package
v0.2.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	// Standard FDs.
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	// CLI args.
	Args []string

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

type Instance

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

Instance ...

NOTE: Instance is NOT concurrency safe. One at a time please!!

func (*Instance) Close

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

func (*Instance) IsClosed

func (inst *Instance) IsClosed() bool

func (*Instance) Run

func (inst *Instance) Run(ctx context.Context, args Args) (uint32, error)

type Instantiator

type Instantiator struct {
	// Module ...
	Module string

	// Runtime ...
	Runtime func(context.Context) wazero.Runtime

	// Config ...
	Config func() wazero.ModuleConfig

	// Source ...
	Source []byte
}

func (*Instantiator) New

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

Jump to

Keyboard shortcuts

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