Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 844 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 844 Bytes

Envoy filter with Rust and WebAssembly

This is a demo accompanying a blogpost about building Envoy filters with Rust and WebAssembly.

Getting started

  1. Install WebAssembly target for rust

    $ rustup update
    $ rustup target add wasm32-unknown-unknown
  2. Install wasme

    $ curl -sL https://run.solo.io/wasme/install | sh
    $ export PATH=$HOME/.wasme/bin:$PATH
  3. Clone the repo and use the makefile to build and run the demo:

    $ make build-image
    $ make deploy-envoy

Now you can open http://localhost:8080/headers. This is proxying to http://httpbin.org/headers, reflecting request headers back at you. You should see

"X-Hello": "Hello world from localhost:8080"

which was injected by the filter.