2024-07-10 10:06:02 -07:00
# Envoy filter code for gateway
2024-07-10 13:47:26 -07:00
## Add toolchain
```sh
2024-11-12 10:35:14 -08:00
$ rustup target add wasm32-wasip1
2024-07-10 13:47:26 -07:00
```
2024-07-10 10:06:02 -07:00
## Building
```sh
2024-11-12 10:35:14 -08:00
$ cargo build --target wasm32-wasip1 --release
2024-07-10 10:06:02 -07:00
```
2024-07-25 14:41:36 -07:00
## Testing
```sh
$ cargo test
```
2024-10-08 15:32:49 -07:00
## Local development
2026-01-28 17:47:33 -08:00
- Build docker image for Plano. Note this needs to be built once.
2024-10-08 15:32:49 -07:00
```
$ sh build_filter_image.sh
```
- Build filter binary,
```
2024-11-12 10:35:14 -08:00
$ cargo build --target wasm32-wasip1 --release
2024-10-08 15:32:49 -07:00
```
2026-01-28 17:47:33 -08:00
- Start envoy with config.yaml and test,
2024-10-08 15:32:49 -07:00
```
2026-01-28 17:47:33 -08:00
$ docker compose -f docker-compose.dev.yaml up plano
2024-10-08 15:32:49 -07:00
```
- dev version of docker-compose file uses following files that are mounted inside the container. That means no docker rebuild is needed if any of these files change. Just restart the container and chagne will be picked up,
2024-10-08 17:20:51 -07:00
- envoy.template.yaml
- intelligent_prompt_gateway.wasm