Skip to content

Commit 6d8a4f6

Browse files
PiotrSikoraSwaagie
authored andcommitted
Use wasm32-wasip1 target. (proxy-wasm#277)
Note that @rules_rust//rust/platform:wasi still evaluates to wasm32-wasi, and there is no @platforms//os defined for wasip1, so this doesn't change anything for Bazel builds. Signed-off-by: Piotr Sikora <[email protected]>
1 parent 78d2489 commit 6d8a4f6

File tree

13 files changed

+36
-36
lines changed

13 files changed

+36
-36
lines changed

.github/workflows/rust.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
- name: Build (wasm32-unknown-unknown)
8484
run: bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasm //...
8585

86-
- name: Build (wasm32-wasi)
86+
- name: Build (wasm32-wasip1)
8787
run: bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasi //...
8888

8989
- name: Format (buildifier)
@@ -196,19 +196,19 @@ jobs:
196196
run: |
197197
rustup toolchain install stable --component clippy --component rustfmt
198198
rustup target add wasm32-unknown-unknown
199-
rustup target add wasm32-wasi
199+
rustup target add wasm32-wasip1
200200
201201
- name: Build (wasm32-unknown-unknown)
202202
run: cargo build --release --all-targets --target=wasm32-unknown-unknown
203203

204204
- name: Clippy (wasm32-unknown-unknown)
205205
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown
206206

207-
- name: Build (wasm32-wasi)
208-
run: cargo build --release --all-targets --target=wasm32-wasi
207+
- name: Build (wasm32-wasip1)
208+
run: cargo build --release --all-targets --target=wasm32-wasip1
209209

210-
- name: Clippy (wasm32-wasi)
211-
run: cargo clippy --release --all-targets --target=wasm32-wasi
210+
- name: Clippy (wasm32-wasip1)
211+
run: cargo clippy --release --all-targets --target=wasm32-wasip1
212212

213213
- name: Format (rustfmt)
214214
run: cargo fmt -- --check
@@ -259,19 +259,19 @@ jobs:
259259
rustup toolchain install nightly --component clippy --component rustfmt
260260
rustup default nightly
261261
rustup target add wasm32-unknown-unknown
262-
rustup target add wasm32-wasi
262+
rustup target add wasm32-wasip1
263263
264264
- name: Build (wasm32-unknown-unknown)
265265
run: cargo build --release --all-targets --target=wasm32-unknown-unknown
266266

267267
- name: Clippy (wasm32-unknown-unknown)
268268
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown
269269

270-
- name: Build (wasm32-wasi)
271-
run: cargo build --release --all-targets --target=wasm32-wasi
270+
- name: Build (wasm32-wasip1)
271+
run: cargo build --release --all-targets --target=wasm32-wasip1
272272

273-
- name: Clippy (wasm32-wasi)
274-
run: cargo clippy --release --all-targets --target=wasm32-wasi
273+
- name: Clippy (wasm32-wasip1)
274+
run: cargo clippy --release --all-targets --target=wasm32-wasip1
275275

276276
- name: Format (rustfmt)
277277
run: cargo fmt -- --check
@@ -403,13 +403,13 @@ jobs:
403403
- name: Update Rust
404404
run: |
405405
rustup toolchain install stable --component clippy --component rustfmt
406-
rustup target add wasm32-wasi
406+
rustup target add wasm32-wasip1
407407
408-
- name: Build (wasm32-wasi)
409-
run: cargo build --release --target=wasm32-wasi
408+
- name: Build (wasm32-wasip1)
409+
run: cargo build --release --target=wasm32-wasip1
410410

411-
- name: Clippy (wasm32-wasi)
412-
run: cargo clippy --release --target=wasm32-wasi
411+
- name: Clippy (wasm32-wasip1)
412+
run: cargo clippy --release --target=wasm32-wasip1
413413

414414
- name: Format (rustfmt)
415415
run: cargo fmt -- --check
@@ -429,7 +429,7 @@ jobs:
429429
run: |
430430
docker run --rm \
431431
-v $(pwd)/envoy.yaml:/envoy.yaml \
432-
-v $(pwd)/target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins \
432+
-v $(pwd)/target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins \
433433
envoyproxy/envoy:v1.31-latest \
434434
--mode validate \
435435
-c envoy.yaml
@@ -484,20 +484,20 @@ jobs:
484484
- name: Update Rust
485485
run: |
486486
rustup toolchain install nightly --component clippy --component rustfmt
487-
rustup +nightly target add wasm32-wasi
488487
rustup default nightly
488+
rustup target add wasm32-wasip1
489489
490490
- name: Change crate type from library to binary
491491
run: |
492492
grep -v '^\[lib\]' Cargo.toml > Cargo.tmp
493493
grep -v '^crate-type' Cargo.tmp > Cargo.toml
494494
mv src/lib.rs src/main.rs
495495
496-
- name: Build (wasm32-wasi)
497-
run: cargo build --release --target=wasm32-wasi
496+
- name: Build (wasm32-wasip1)
497+
run: cargo build --release --target=wasm32-wasip1
498498

499-
- name: Clippy (wasm32-wasi)
500-
run: cargo clippy --release --target=wasm32-wasi
499+
- name: Clippy (wasm32-wasip1)
500+
run: cargo clippy --release --target=wasm32-wasip1
501501

502502
- name: Format (rustfmt)
503503
run: cargo fmt -- --check
@@ -517,7 +517,7 @@ jobs:
517517

518518
- name: Rename .wasm to match expected filename
519519
run: |
520-
cd target/wasm32-wasi/release
520+
cd target/wasm32-wasip1/release
521521
for file in $(ls -1 *.wasm); do \
522522
mv $file $(echo $file | sed 's/-/_/g'); \
523523
done
@@ -526,7 +526,7 @@ jobs:
526526
run: |
527527
docker run --rm \
528528
-v $(pwd)/envoy.yaml:/envoy.yaml \
529-
-v $(pwd)/target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins \
529+
-v $(pwd)/target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins \
530530
envoyproxy/envoy:v1.31-latest \
531531
--mode validate \
532532
-c envoy.yaml

examples/grpc_auth_random/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Proxy-Wasm plugin that grants access based on a result of gRPC callout.
55
### Building
66

77
```sh
8-
$ cargo build --target wasm32-wasi --release
8+
$ cargo build --target wasm32-wasip1 --release
99
```
1010

1111
### Using in Envoy

examples/grpc_auth_random/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
- "10000:10000"
2121
volumes:
2222
- ./envoy.yaml:/etc/envoy/envoy.yaml
23-
- ./target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins
23+
- ./target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins
2424
networks:
2525
- envoymesh
2626
depends_on:

examples/hello_world/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Proxy-Wasm background service plugin that logs time and random numbers.
55
### Building
66

77
```sh
8-
$ cargo build --target wasm32-wasi --release
8+
$ cargo build --target wasm32-wasip1 --release
99
```
1010

1111
### Using in Envoy

examples/hello_world/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
- "10000:10000"
2121
volumes:
2222
- ./envoy.yaml:/etc/envoy/envoy.yaml
23-
- ./target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins
23+
- ./target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins
2424
networks:
2525
- envoymesh
2626
networks:

examples/http_auth_random/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Proxy-Wasm plugin that grants access based on a result of HTTP callout.
55
### Building
66

77
```sh
8-
$ cargo build --target wasm32-wasi --release
8+
$ cargo build --target wasm32-wasip1 --release
99
```
1010

1111
### Using in Envoy

examples/http_auth_random/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
- "10000:10000"
2121
volumes:
2222
- ./envoy.yaml:/etc/envoy/envoy.yaml
23-
- ./target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins
23+
- ./target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins
2424
networks:
2525
- envoymesh
2626
depends_on:

examples/http_body/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Proxy-Wasm plugin that redacts sensitive HTTP responses.
55
### Building
66

77
```sh
8-
$ cargo build --target wasm32-wasi --release
8+
$ cargo build --target wasm32-wasip1 --release
99
```
1010

1111
### Using in Envoy

examples/http_body/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
- "10000:10000"
2121
volumes:
2222
- ./envoy.yaml:/etc/envoy/envoy.yaml
23-
- ./target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins
23+
- ./target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins
2424
networks:
2525
- envoymesh
2626
networks:

examples/http_config/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Proxy-Wasm plugin that injects HTTP response header with a value from Envoy conf
55
### Building
66

77
```sh
8-
$ cargo build --target wasm32-wasi --release
8+
$ cargo build --target wasm32-wasip1 --release
99
```
1010

1111
### Using in Envoy

0 commit comments

Comments
 (0)