util

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRead

func MustRead(mem api.Memory, funcName string, paramIdx int, offset, byteCount uint32) []byte

MustRead is like api.Memory except that it panics if the offset and byteCount are out of range.

func MustWrite

func MustWrite(mem api.Memory, fieldName string, offset uint32, val []byte)

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

func ResolvePath(cwd, path string) (resolved string)

ResolvePath is needed when a non-absolute path is given to a function. Unlike other host ABI, GOOS=js maintains the CWD host side.

Types

This section is empty.

Jump to

Keyboard shortcuts

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