package util
import "github.com/tetratelabs/wazero/internal/gojs/util"
Index ¶
- func MustRead(mem api.Memory, funcName string, paramIdx int, offset, byteCount uint32) []byte
- func MustWrite(mem api.Memory, fieldName string, offset uint32, val []byte)
- func NewFunc(name string, goFunc api.GoModuleFunc) *wasm.HostFunc
- func ResolvePath(cwd, path string) (resolved string)
Functions ¶
func MustRead ¶
MustRead is like api.Memory except that it panics if the offset and byteCount are out of range.
func MustWrite ¶
MustWrite is like api.Memory except that it panics if the offset is out of range.
func NewFunc ¶
func NewFunc(name string, goFunc api.GoModuleFunc) *wasm.HostFunc
func ResolvePath ¶
ResolvePath is needed when a non-absolute path is given to a function. Unlike other host ABI, GOOS=js maintains the CWD host side.
Source Files ¶
- Version
- v1.2.1
- Published
- Jun 14, 2023
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 9 hours ago –
Tools for package owners.