The Go SDK for Proxy-Wasm, enabling developers to write Proxy-Wasm plugins in Go. This SDK is powered by TinyGo and does not support the official Go compiler.
- examples directory contains the example codes on top of this SDK.
- OVERVIEW.md the overview of Proxy-Wasm, the API of this SDK, and the things you should know when writing plugins.
- TinyGo - This SDK depends on TinyGo and leverages its WASI (WebAssembly System Interface) target. Please follow the official instruction here for installing TinyGo.
- Envoy - To run compiled examples, you need to have Envoy binary. We recommend using func-e as the easiest way to get started with Envoy. Alternatively, you can follow the official instruction.
go get github.com/tetratelabs/proxy-wasm-go-sdk
# Build all examples.
make build.examples
# Build a specific example.
make build.example name=helloworld
# Run a specific example.
make run name=helloworld
Envoy is the first host side implementation of Proxy-Wasm ABI, and we run end-to-end tests with multiple versions of Envoy and Envoy-based istio/proxy in order to verify Proxy-Wasm Go SDK works as expected.
Please refer to workflow.yaml for which version is used for End-to-End tests.
The following build tags can be used to customize the behavior of the built plugin:
proxywasm_timing
: Enables logging of time spent in invocation of the plugin's exported functions. This can be useful for debugging performance issues.
We welcome contributions from the community! See CONTRIBUTING.md for how to contribute to this repository.