Skip to content

Commit 4a887a2

Browse files
committed
Switch from deprecated wasm32-wasi to wasm32-wasip1
1 parent 7fccf70 commit 4a887a2

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
- name: Run tests with miscellaneous features
131131
run: ${{ env.CARGO }} test --verbose --features logging
132132

133-
# Setup and run tests on the wasm32-wasi target via wasmtime.
133+
# Setup and run tests on the wasm32-wasip1 target via wasmtime.
134134
wasm:
135135
runs-on: ubuntu-latest
136136
env:
@@ -143,16 +143,16 @@ jobs:
143143
uses: dtolnay/rust-toolchain@master
144144
with:
145145
toolchain: stable
146-
- name: Add wasm32-wasi target
147-
run: rustup target add wasm32-wasi
146+
- name: Add wasm32-wasip1 target
147+
run: rustup target add wasm32-wasip1
148148
- name: Download and install Wasmtime
149149
run: |
150-
echo "CARGO_BUILD_TARGET=wasm32-wasi" >> $GITHUB_ENV
150+
echo "CARGO_BUILD_TARGET=wasm32-wasip1" >> $GITHUB_ENV
151151
echo "RUSTFLAGS=-Ctarget-feature=+simd128" >> $GITHUB_ENV
152152
curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v$WASMTIME_VERSION/wasmtime-v$WASMTIME_VERSION-x86_64-linux.tar.xz
153153
tar xvf wasmtime-v$WASMTIME_VERSION-x86_64-linux.tar.xz
154154
echo `pwd`/wasmtime-v$WASMTIME_VERSION-x86_64-linux >> $GITHUB_PATH
155-
echo "CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime run --wasm simd --" >> $GITHUB_ENV
155+
echo "CARGO_TARGET_WASM32_WASIP1_RUNNER=wasmtime run --wasm simd --" >> $GITHUB_ENV
156156
- name: Basic build
157157
run: cargo build --verbose
158158
- name: Run tests
@@ -162,7 +162,7 @@ jobs:
162162
- name: Run tests without any features enabled (core-only)
163163
run: cargo test --verbose --no-default-features
164164

165-
# Setup and run tests on the wasm32-wasi target via wasmtime, but without
165+
# Setup and run tests on the wasm32-wasip1 target via wasmtime, but without
166166
# simd128 enabled.
167167
wasm-no-simd128:
168168
runs-on: ubuntu-latest
@@ -176,16 +176,16 @@ jobs:
176176
uses: dtolnay/rust-toolchain@master
177177
with:
178178
toolchain: stable
179-
- name: Add wasm32-wasi target
180-
run: rustup target add wasm32-wasi
179+
- name: Add wasm32-wasip1 target
180+
run: rustup target add wasm32-wasip1
181181
- name: Download and install Wasmtime
182182
run: |
183-
echo "CARGO_BUILD_TARGET=wasm32-wasi" >> $GITHUB_ENV
183+
echo "CARGO_BUILD_TARGET=wasm32-wasip1" >> $GITHUB_ENV
184184
echo "RUSTFLAGS=-Ctarget-feature=-simd128" >> $GITHUB_ENV
185185
curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v$WASMTIME_VERSION/wasmtime-v$WASMTIME_VERSION-x86_64-linux.tar.xz
186186
tar xvf wasmtime-v$WASMTIME_VERSION-x86_64-linux.tar.xz
187187
echo `pwd`/wasmtime-v$WASMTIME_VERSION-x86_64-linux >> $GITHUB_PATH
188-
echo "CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime run --" >> $GITHUB_ENV
188+
echo "CARGO_TARGET_WASM32_WASIP1_RUNNER=wasmtime run --" >> $GITHUB_ENV
189189
- name: Basic build
190190
run: cargo build --verbose
191191
- name: Run tests
@@ -270,8 +270,8 @@ jobs:
270270
uses: dtolnay/rust-toolchain@master
271271
with:
272272
toolchain: stable
273-
- name: Add wasm32-wasi target
274-
run: rustup target add wasm32-wasi
273+
- name: Add wasm32-wasip1 target
274+
run: rustup target add wasm32-wasip1
275275
- name: Download and install Wasmtime
276276
run: |
277277
# Note that we don't have to set CARGO_BUILD_TARGET and other

benchmarks/engines.toml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,28 @@
6262
bin = "wasmtime"
6363
args = [
6464
"run", "--wasm", "simd", "--",
65-
"./target/wasm32-wasi/release/main.wasm",
65+
"./target/wasm32-wasip1/release/main.wasm",
6666
"--version",
6767
]
6868
[engine.run]
6969
bin = "wasmtime"
7070
args = [
7171
"run", "--wasm", "simd", "--",
72-
"./target/wasm32-wasi/release/main.wasm",
72+
"./target/wasm32-wasip1/release/main.wasm",
7373
"memchr-oneshot",
7474
]
7575
[[engine.build]]
7676
bin = "cargo"
7777
args = ["build", "--release"]
7878
envs = [
79-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
79+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
8080
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
8181
]
8282
[[engine.clean]]
8383
bin = "cargo"
8484
args = ["clean"]
8585
envs = [
86-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
86+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
8787
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
8888
]
8989

@@ -546,7 +546,7 @@
546546

547547
# Engines that specifically target wasm32. These reuse the actual code from
548548
# existing engines in `rust/memchr`, but change the build configuration to
549-
# build for `wasm32-wasi` and use the `wasmtime` JIT to actually run it. We
549+
# build for `wasm32-wasip1` and use the `wasmtime` JIT to actually run it. We
550550
# don't define every possible engine for wasm32, but just a subset for basic
551551
# sanity checks. If it would be beneficial to be more exhaustive, please file
552552
# an issue.
@@ -558,28 +558,28 @@
558558
bin = "wasmtime"
559559
args = [
560560
"run", "--wasm", "simd", "--",
561-
"./target/wasm32-wasi/release/main.wasm",
561+
"./target/wasm32-wasip1/release/main.wasm",
562562
"--version",
563563
]
564564
[engine.run]
565565
bin = "wasmtime"
566566
args = [
567567
"run", "--wasm", "simd", "--",
568-
"./target/wasm32-wasi/release/main.wasm",
568+
"./target/wasm32-wasip1/release/main.wasm",
569569
"memchr-prebuilt",
570570
]
571571
[[engine.build]]
572572
bin = "cargo"
573573
args = ["build", "--release"]
574574
envs = [
575-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
575+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
576576
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
577577
]
578578
[[engine.clean]]
579579
bin = "cargo"
580580
args = ["clean"]
581581
envs = [
582-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
582+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
583583
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
584584
]
585585

@@ -590,28 +590,28 @@
590590
bin = "wasmtime"
591591
args = [
592592
"run", "--wasm", "simd", "--",
593-
"./target/wasm32-wasi/release/main.wasm",
593+
"./target/wasm32-wasip1/release/main.wasm",
594594
"--version",
595595
]
596596
[engine.run]
597597
bin = "wasmtime"
598598
args = [
599599
"run", "--wasm", "simd", "--",
600-
"./target/wasm32-wasi/release/main.wasm",
600+
"./target/wasm32-wasip1/release/main.wasm",
601601
"memchr-onlycount",
602602
]
603603
[[engine.build]]
604604
bin = "cargo"
605605
args = ["build", "--release"]
606606
envs = [
607-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
607+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
608608
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
609609
]
610610
[[engine.clean]]
611611
bin = "cargo"
612612
args = ["clean"]
613613
envs = [
614-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
614+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
615615
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
616616
]
617617

@@ -622,28 +622,28 @@
622622
bin = "wasmtime"
623623
args = [
624624
"run", "--wasm", "simd", "--",
625-
"./target/wasm32-wasi/release/main.wasm",
625+
"./target/wasm32-wasip1/release/main.wasm",
626626
"--version",
627627
]
628628
[engine.run]
629629
bin = "wasmtime"
630630
args = [
631631
"run", "--wasm", "simd", "--",
632-
"./target/wasm32-wasi/release/main.wasm",
632+
"./target/wasm32-wasip1/release/main.wasm",
633633
"memchr2",
634634
]
635635
[[engine.build]]
636636
bin = "cargo"
637637
args = ["build", "--release"]
638638
envs = [
639-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
639+
{ name = "CARGO_BUILD_TARGET", value = "wasm32p1-wasi" },
640640
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
641641
]
642642
[[engine.clean]]
643643
bin = "cargo"
644644
args = ["clean"]
645645
envs = [
646-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
646+
{ name = "CARGO_BUILD_TARGET", value = "wasm32p1-wasi" },
647647
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
648648
]
649649

@@ -654,28 +654,28 @@
654654
bin = "wasmtime"
655655
args = [
656656
"run", "--wasm", "simd", "--",
657-
"./target/wasm32-wasi/release/main.wasm",
657+
"./target/wasm32-wasip1/release/main.wasm",
658658
"--version",
659659
]
660660
[engine.run]
661661
bin = "wasmtime"
662662
args = [
663663
"run", "--wasm", "simd", "--",
664-
"./target/wasm32-wasi/release/main.wasm",
664+
"./target/wasm32-wasip1/release/main.wasm",
665665
"memchr3",
666666
]
667667
[[engine.build]]
668668
bin = "cargo"
669669
args = ["build", "--release"]
670670
envs = [
671-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
671+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
672672
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
673673
]
674674
[[engine.clean]]
675675
bin = "cargo"
676676
args = ["clean"]
677677
envs = [
678-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
678+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
679679
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
680680
]
681681

@@ -686,28 +686,28 @@
686686
bin = "wasmtime"
687687
args = [
688688
"run", "--wasm", "simd", "--",
689-
"./target/wasm32-wasi/release/main.wasm",
689+
"./target/wasm32-wasip1/release/main.wasm",
690690
"--version",
691691
]
692692
[engine.run]
693693
bin = "wasmtime"
694694
args = [
695695
"run", "--wasm", "simd", "--",
696-
"./target/wasm32-wasi/release/main.wasm",
696+
"./target/wasm32-wasip1/release/main.wasm",
697697
"memmem-prebuilt",
698698
]
699699
[[engine.build]]
700700
bin = "cargo"
701701
args = ["build", "--release"]
702702
envs = [
703-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
703+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
704704
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
705705
]
706706
[[engine.clean]]
707707
bin = "cargo"
708708
args = ["clean"]
709709
envs = [
710-
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasi" },
710+
{ name = "CARGO_BUILD_TARGET", value = "wasm32-wasip1" },
711711
{ name = "RUSTFLAGS", value = "-Ctarget-feature=+simd128" },
712712
]
713713

0 commit comments

Comments
 (0)