wasmutil

package
v0.0.0-...-e082e2d Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObjToPtr

func ObjToPtr(obj any) (uint64, error)

ObjToPtr copies an object to a newly allocated memory and returns a single uint64 with format (ptr << 32) | size This method is intended to be used in WASM exports

func PtrToObj

func PtrToObj(strPtr uint64, obj any) error

PtrToObj converts a single uint64 with format (ptr << 32) | size to an object This method is intended to be used in WASM exports

func PtrToStr

func PtrToStr(strPtr uint64) string

PtrToStr converts a single uint64 with format (ptr << 32) | size to a string This method is intended to be used in WASM exports

func StrToLeakedPtr

func StrToLeakedPtr(str string) uint64

StrToLeakedPtr copies a string to a newly allocated memory and returns a single uint64 with format (ptr << 32) | size This method is intended to be used in WASM exports

func StrToPtr

func StrToPtr(str string) uint64

StrToPtr converts a string to an uint64 pointer in the module's memory. It returns the pointer in format (ptr << 32) | size This method is intended to be used in WASM exports

Types

This section is empty.

Jump to

Keyboard shortcuts

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