Skip to content

Commit 1745d75

Browse files
committed
Switch TCP routing example to wasm32-wasi target and pin MSRV-compatible deps
- Change build target from wasm32-wasip1 to wasm32-wasi for MSRV (1.65) compatibility - Update docker-compose.yaml to mount wasm32-wasi artifact path - Pin build dependencies to latest MSRV-compatible versions: - prost-build 0.11.9, quote 1.0.41, proc-macro2 1.0 (existing pins) - indexmap 2.11.4, home 0.5.5 (pinned transitive deps) - Update README.md build instructions to reflect new target The wasm32-wasip1 target is not available in Rust 1.65. By switching to wasm32-wasi and constraining transitive dependencies that require newer Rust editions (indexmap 2.12+ needs edition 2024, home 0.5.12+ needs edition 2024), we ensure the example builds with the project's MSRV. Signed-off-by: Christof Gerber <[email protected]>
1 parent f74a46a commit 1745d75

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

examples/envoy_tcp_routing/Cargo.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ crate-type = ["cdylib"]
1313
[dependencies]
1414
log = "0.4"
1515
proxy-wasm = { path = "../../" }
16-
prost = "0.12"
16+
# Pin to MSRV-compatible prost release
17+
prost = "=0.11.9"
1718

1819
[build-dependencies]
19-
prost-build = "0.12"
20-
# Pin proc-macro2 and quote to versions compatible with Rust 1.65 (MSRV)
21-
proc-macro2 = "=1.0.92"
22-
quote = "=1.0.37"
20+
# Pin to MSRV (v1.65) compatible releases
21+
prost-build = "=0.11.9"
22+
quote = "=1.0.41"
23+
proc-macro2 = "1.0"
24+
# Pin transitive dependencies to MSRV (v1.65) versions
25+
indexmap = "=2.11.4"
26+
home = "=0.5.5"
27+

examples/envoy_tcp_routing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The filter uses Envoy's `set_envoy_filter_state` foreign function to dynamically
2323
Build the WASM plugin from the example directory:
2424

2525
```sh
26-
$ cargo build --target wasm32-wasip1 --release
26+
$ cargo build --target wasm32-wasi --release
2727
```
2828

2929
### Running with Docker Compose

examples/envoy_tcp_routing/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
entrypoint: /usr/local/bin/envoy -c /etc/envoy.yaml -l info --service-cluster proxy
1919
volumes:
2020
- ./envoy/envoy.yaml:/etc/envoy.yaml
21-
- ./target/wasm32-wasip1/release/proxy_wasm_example_envoy_tcp_routing.wasm:/etc/envoy_tcp_routing.wasm
21+
- ./target/wasm32-wasi/release/proxy_wasm_example_envoy_tcp_routing.wasm:/etc/envoy_tcp_routing.wasm
2222
networks:
2323
- envoymesh
2424
ports:

0 commit comments

Comments
 (0)