helper

package
v0.0.86 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package helper contains WASM-related helper functions and methods. This package is separate from `go-sdk` to avoid polluting go-sdk's public API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadRequestFromMemory

func ReadRequestFromMemory(module api.Module, msg proto.Message, ptr, length int32) error

ReadRequestFromMemory is a helper function that reads raw memory starting at 'ptr' for 'length' bytes. Once read, it will attempt to unmarshal the data into the provided proto.Message.

func WriteResponseToMemory

func WriteResponseToMemory(module api.Module, msg proto.Message) (uint64, error)

WriteResponseToMemory is a helper function that marshals provided message to module memory, appends terminators and returns the pointer to the start of the message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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