Documentation
¶
Index ¶
- func AsExitError(err error) (exitCode int, ok bool)
- func JsInstantiate(ctx context.Context, rt wazero.Runtime) (api.Closer, error)
- func RunWasm(cfg *config.Config, wasmName string, wasmBytes []byte, mainFunc string, ...) (stdout, stderr []byte, err error)
- func UnknownInstantiate(ctx context.Context, rt wazero.Runtime) (api.Closer, error)
- func WasiInstantiate(ctx context.Context, rt wazero.Runtime) (api.Closer, error)
- type Module
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsExitError ¶
func JsInstantiate ¶ added in v0.9.0
func RunWasm ¶
func RunWasm(cfg *config.Config, wasmName string, wasmBytes []byte, mainFunc string, wasmArgs ...string) (stdout, stderr []byte, err error)
单次执行 wasm
func UnknownInstantiate ¶ added in v0.9.0
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
wasm 模块, 可多次执行
func BuildModule ¶
func BuildModule( cfg *config.Config, wasmName string, wasmBytes []byte, wasmArgs ...string, ) (*Module, error)
构建模块(会执行编译)
Click to show internal directories.
Click to hide internal directories.