Skip to content

Commit 21132db

Browse files
committed
fix: wasm32-wasi has been deprecated
The `wasm32-wasi` target has been renamed to `wasm32-wasip1`: <https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html> The `cargo-wasi` crate is also outdated and being replaced with `cargo-component` for creating WASI components. It does not support the new target name. <bytecodealliance/cargo-wasi#143> However, this project doesn't currently define a WASI component, so we can't use cargo-component to build or run tests. We do want to verify that the project builds correctly for the WASM targets, so this change runs the compiled test targets directly with `wasmtime`.
1 parent 9778aa5 commit 21132db

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/rust.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ jobs:
3131
- uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa # stable
3232
with:
3333
toolchain: stable
34-
target: wasm32-wasi
34+
target: wasm32-wasip1
3535
- uses: taiki-e/install-action@c4bf614c2fb42375baf4f51283c33befce095fc5
3636
with:
37-
tool: wasmtime,cargo-wasi
38-
- env:
39-
CARGO_TARGET_WASM32_WASI_RUNNER: "wasmtime --dir=."
40-
run: cargo wasi test -- --nocapture
37+
tool: wasmtime
38+
- name: "WASM: lib tests"
39+
run: wasmtime --dir=. target/wasm32-wasip1/debug/jsonata_rs-*.wasm
40+
- name: "WASM: integration test"
41+
run: wasmtime --dir=. target/wasm32-wasip1/debug/testsuite-*.wasm
4142

4243
fmt_lint:
4344
permissions:

0 commit comments

Comments
 (0)