From 03965f93a38b24012c934ee07212392e808014d8 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 26 Feb 2025 11:06:24 +0100 Subject: [PATCH] Fix WASI target name --- .cargo/config.toml | 2 +- .github/workflows/ci.yml | 2 +- src/wasm_term.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 9de6c3c5..428ed227 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ -[target.wasm32-wasi] +[target.wasm32-wasip1] runner = ["./scripts/wasmtime-wrapper.sh"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23c3a4d9..1ac16c38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,7 +118,7 @@ jobs: strategy: fail-fast: false matrix: - target: [wasm32-wasi] + target: [wasm32-wasip1] runs-on: ubuntu-latest steps: - name: Install rust diff --git a/src/wasm_term.rs b/src/wasm_term.rs index 13b844b2..176ee8f0 100644 --- a/src/wasm_term.rs +++ b/src/wasm_term.rs @@ -10,11 +10,11 @@ pub const DEFAULT_WIDTH: u16 = 80; #[inline] pub fn is_a_terminal(_out: &Term) -> bool { - #[cfg(target = "wasm32-wasi")] + #[cfg(target = "wasm32-wasip1")] { unsafe { libc::isatty(out.as_raw_fd()) != 0 } } - #[cfg(not(target = "wasm32-wasi"))] + #[cfg(not(target = "wasm32-wasip1"))] { false }