package proxy

import "github.com/tetratelabs/wazero/internal/testing/proxy"

Index

Functions

func NewLoggingListenerFactory

func NewLoggingListenerFactory(writer logging.Writer, scopes logging.LogScopes) experimental.FunctionListenerFactory

NewLoggingListenerFactory is like logging.NewHostLoggingListenerFactory, except it skips logging proxying functions from NewModuleBinary.

func NewModuleBinary

func NewModuleBinary(moduleName string, proxyTarget wazero.CompiledModule) []byte

NewModuleBinary creates the proxy module to proxy a function call against all the exported functions in `proxyTarget`, and returns its encoded binary. The resulting module exports the proxy functions whose names are exactly the same as the proxy destination.

This is used to test host call implementations. If logging, use NewLoggingListenerFactory to avoid messages from the proxying module.

Source Files

proxy.go

Version
v1.9.0 (latest)
Published
Feb 18, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
4 days ago

Tools for package owners.