Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NoReturnedStruct = uint64(0)
Functions ¶
func InvokeImplFromStack ¶
func InvokeImplFromStack[T proto.Message, U proto.Message](ctx context.Context, name string, m api.Module, stack []uint64, fn func(context.Context, T, U) int32, t T, u U)
InvokeImplFromStack is the primary interface between host code and the machinery to communicate with the guest. This function takes the parameters like an api.Module and a section of the stack provided by Wazero and then reads and writes an input and output protocol buffer to the guest memory. The name is provided here just for human error messages. This functions uses pullRequestFromStack and and pushResponseToStack to do the actual work of encoding and decoding the values to/from the guest memory.
Types ¶
type ParigotInit ¶
ParigotInit is the interface that plugins must meet to be initialized. It is expected that they will use the supplied Engine in the call to Init to register Host functions.
func LoadAndReturnInit ¶
func LoadAndReturnInit(ctx context.Context, pluginPath, pluginSymbol, _ string) (ParigotInit, error)
LoadAndReturnInit is a utility function for plugins that want the default implementation. This function accepts third string param (name) but ignores it.