From 9a32b9ded53de0314a6c0d23021d1eec9f67adf3 Mon Sep 17 00:00:00 2001 From: Xinzhao Xu Date: Thu, 4 Jul 2024 20:12:29 +0800 Subject: [PATCH] Update to -S cli instead of -S common for wasmtime commands (#317) --- .github/workflows/main.yml | 2 +- src/lib.rs | 4 ++-- tests/run.rs | 2 +- tests/test.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 78fe8e68..685165ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: uses: bytecodealliance/actions/wasmtime/setup@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - version: "v19.0.2" + version: "v22.0.0" - name: Run all tests run: cargo test --all diff --git a/src/lib.rs b/src/lib.rs index 5a4b701e..ca5f8810 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -274,9 +274,9 @@ fn get_runner(serve: bool) -> Result { ( PathAndArgs::new("wasmtime") .args(if serve { - vec!["serve", "-S", "common", "-S", "http"] + vec!["serve", "-S", "cli", "-S", "http"] } else { - vec!["-S", "preview2", "-S", "common"] + vec!["-S", "preview2", "-S", "cli"] }) .to_owned(), true, diff --git a/tests/run.rs b/tests/run.rs index 30d43eeb..b5bb6c98 100644 --- a/tests/run.rs +++ b/tests/run.rs @@ -100,7 +100,7 @@ bindings::export!(Component with_types_in bindings); .cargo_component("run") .env( "CARGO_TARGET_WASM32_WASIP1_RUNNER", - "wasmtime --env APP_NAME=CargoComponent -C cache=no -W component-model -S preview2 -S common", + "wasmtime --env APP_NAME=CargoComponent -C cache=no -W component-model -S preview2 -S cli", ) .assert() .stdout(contains("[guest] running component 'my:reactor'")) diff --git a/tests/test.rs b/tests/test.rs index d18b0dc8..dfd63525 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -24,7 +24,7 @@ runner = [ "-S", "preview2", "-S", - "common", + "cli", ]"#, )?;