wasix_32v1

package
v0.0.0-...-817756c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "wasix_32v1"

Variables

This section is empty.

Functions

func BackgroundContext

func BackgroundContext() context.Context

func Instantiate

func Instantiate(ctx context.Context, r wazero.Runtime) (api.Closer, error)

Instantiate instantiates the ModuleName module into the runtime.

Notes

  • Failure cases are documented on wazero.Runtime InstantiateModule.
  • Closing the wazero.Runtime has the same effect as closing the result.

func MustInstantiate

func MustInstantiate(ctx context.Context, r wazero.Runtime)

MustInstantiate calls Instantiate or panics on error.

This is a simpler function for those who know the module ModuleName is not already instantiated, and don't need to unload it.

Types

type Builder

type Builder interface {
	// Compile compiles the ModuleName module. Call this before Instantiate.
	//
	// Note: This has the same effect as the same function on wazero.HostModuleBuilder.
	Compile(context.Context) (wazero.CompiledModule, error)

	// Instantiate instantiates the ModuleName module and returns a function to close it.
	//
	// Note: This has the same effect as the same function on wazero.HostModuleBuilder.
	Instantiate(context.Context) (api.Closer, error)
}

Builder configures the ModuleName module for later use via Compile or Instantiate.

Notes

  • This is an interface for decoupling, not third-party implementations. All implementations are in wazero.

func NewBuilder

func NewBuilder(r wazero.Runtime) Builder

NewBuilder returns a new Builder.

Jump to

Keyboard shortcuts

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