Skip to content

layotto/proxy-wasm-go-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is in its early stage, and the API is likely to change and not stable.

WebAssembly for Proxies (Go SDK) Build License

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.

Getting Started

  • 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.

Requirements

  • 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. Please follow the official instruction.

Installation

go get cannot be used for fetching this SDK and updating go.mod of your project due to the existence of "extern" functions which are only available in TinyGo. Instead, we can manually setup go.mod and go.sum via go mod edit and go mod download:

$ go mod edit -require=github.com/tetratelabs/proxy-wasm-go-sdk@main
$ go mod download github.com/tetratelabs/proxy-wasm-go-sdk

Build and run Examples

# Build all examples.
make build.examples

# Build a specific example.
make build.example name=helloworld

# Run a specific example.
make run name=helloworld

Compatible Envoy builds

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.

Contributing

We welcome contributions from the community! See CONTRIBUTING.md for how to contribute to this repository.

External links

About

WebAssembly for Proxies (Go SDK)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.5%
  • Makefile 1.5%