wasmguest

package
v0.0.0-...-6c78b00 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Package wasmguest is a go client implementation compatible with the wasmrpc main module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCClient

type RPCClient struct {
	// contains filtered or unexported fields
}

RPCClient is a reusable client for making wasmrpc host requests.

func NewRPCClient

func NewRPCClient(capacity int) (client *RPCClient)

NewRPCClient initializes a new client with the given capacity size. All client<->host messages must fit in the given capacity and a minimum of 256 bytes is recommended.

func (*RPCClient) CallHost

func (c *RPCClient) CallHost(method string, args msgprpc.Value, resp msgprpc.Value) (err error)

CallHost encodes the given request method and arguments and calls the WASM host to serve the request. If no error occurs, the result will be stored in resp,

Source Files

  • wasmguest.go

Jump to

Keyboard shortcuts

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