From fa9a0aae5545cd901325aaf38978a88cf7163bd2 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 26 Jul 2024 12:29:19 -0700 Subject: [PATCH 1/2] toolchain: use wasm32-wasip1 target, remove nightly requirement --- .github/workflows/main.yml | 2 +- rust-toolchain.toml | 4 ---- tests/virt.rs | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 rust-toolchain.toml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f701fd..1091a23 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: submodules: recursive - name: Install Rust - run: rustup update nightly --no-self-update && rustup default nightly && rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu + run: rustup update stable --no-self-update && rustup default stable && rustup component add rust-src --toolchain stable - name: Install wasm32-unknown target run: rustup target add wasm32-unknown-unknown diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index f8d4f98..0000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,4 +0,0 @@ -[toolchain] -channel = "nightly-2024-05-22" -components = ["rust-src"] -targets = ["wasm32-unknown-unknown"] diff --git a/tests/virt.rs b/tests/virt.rs index 1598514..96c9cdb 100644 --- a/tests/virt.rs +++ b/tests/virt.rs @@ -97,7 +97,7 @@ async fn virt_test() -> Result<()> { let mut generated_component_path = generated_path.join(component_name); generated_component_path.set_extension("component.wasm"); cmd(&format!( - "cargo build -p {component_name} --target wasm32-wasi {}", + "cargo build -p {component_name} --target wasm32-wasip1 {}", if DEBUG { "" } else { "--release" } ))?; @@ -107,7 +107,7 @@ async fn virt_test() -> Result<()> { // encode the component let component_core_path = &format!( - "target/wasm32-wasi/{}/{}.wasm", + "target/wasm32-wasip1/{}/{}.wasm", if DEBUG { "debug" } else { "release" }, component_name.to_snake_case() ); From 966a3fd947a02a7b452d83f3c03ce175df772d79 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 26 Jul 2024 12:31:14 -0700 Subject: [PATCH 2/2] fixup target install --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1091a23..aab722e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,8 +34,8 @@ jobs: - name: Install wasm32-unknown target run: rustup target add wasm32-unknown-unknown - - name: Install wasm32-wasi target - run: rustup target add wasm32-wasi + - name: Install wasm32-wasip1 target + run: rustup target add wasm32-wasip1 - name: Install wasm-tools run: cargo install wasm-tools