Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRuntime ¶ added in v0.5.0
DefaultRuntime implements NewRuntime by returning a wazero runtime with WASI and AssemblyScript host functions instantiated.
func Engine ¶
func Engine() wapc.Engine
Engine returns a new wapc.Engine which uses the DefaultRuntime.
func EngineWithRuntime ¶ added in v0.5.0
func EngineWithRuntime(newRuntime NewRuntime) wapc.Engine
EngineWithRuntime allows you to customize or return an alternative to DefaultRuntime,
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func (*Instance) MemorySize ¶
MemorySize implements the same method as documented on wapc.Instance.
func (*Instance) UnwrapModule ¶ added in v0.5.5
UnwrapModule allows access to wazero-specific api.Module.
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents a compiled waPC module.
func (*Module) Instantiate ¶
Instantiate implements the same method as documented on wapc.Module.
func (*Module) UnwrapRuntime ¶ added in v0.5.5
UnwrapRuntime allows access to wazero-specific runtime features.
func (*Module) WithConfig ¶ added in v0.6.1
func (m *Module) WithConfig(callback func(wazero.ModuleConfig) wazero.ModuleConfig)
WithConfig allows you to override or replace wazero.ModuleConfig used to instantiate each guest. This can be used to configure clocks or filesystem access.
The default (function input) conflgures WASI and waPC init functions as well as stdout and stderr.