Documentation
¶
Index ¶
- func AsExitError(err error) (exitCode int, ok bool)
- func JsInstantiate(ctx context.Context, rt wazero.Runtime) (api.Closer, error)
- func RunWasm(wasmName string, wasmBytes []byte, mainFunc string, wasmArgs ...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)
- func Wat2Wasm(source []byte) ([]byte, 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(wasmName string, wasmBytes []byte, mainFunc string, wasmArgs ...string) (stdout, stderr []byte, err error)
单次执行 wasm
func UnknownInstantiate ¶ added in v0.9.0
func WasiInstantiate ¶
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
wasm 模块, 可多次执行
func BuildModule ¶
构建模块(会执行编译)
func (*Module) HasUnknownImportFunc ¶ added in v0.14.0
是否包含用户自定义的宿主函数
Click to show internal directories.
Click to hide internal directories.