From 799cea7a2752ccc6a9e4b95753410b1ec361c825 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Mon, 22 Dec 2025 12:43:37 -0800 Subject: [PATCH 1/2] wasmtime-jit-icache-coherence: Use `wasmtime_environ::error` instead of `anyhow` --- Cargo.lock | 2 +- crates/jit-icache-coherence/Cargo.toml | 2 +- crates/jit-icache-coherence/src/lib.rs | 2 +- crates/jit-icache-coherence/src/libc.rs | 4 ++-- crates/jit-icache-coherence/src/miri.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28683179234d..0d266b5e1c6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4882,9 +4882,9 @@ dependencies = [ name = "wasmtime-internal-jit-icache-coherence" version = "41.0.0" dependencies = [ - "anyhow", "cfg-if", "libc", + "wasmtime-environ", "windows-sys 0.61.2", ] diff --git a/crates/jit-icache-coherence/Cargo.toml b/crates/jit-icache-coherence/Cargo.toml index f0ab3411ab68..14a715edc8c0 100644 --- a/crates/jit-icache-coherence/Cargo.toml +++ b/crates/jit-icache-coherence/Cargo.toml @@ -14,7 +14,7 @@ workspace = true [dependencies] cfg-if = { workspace = true } -anyhow = { workspace = true } +wasmtime-environ = { workspace = true } [target.'cfg(target_os = "windows")'.dependencies.windows-sys] workspace = true diff --git a/crates/jit-icache-coherence/src/lib.rs b/crates/jit-icache-coherence/src/lib.rs index a78a99ab847d..2922c4d0d610 100644 --- a/crates/jit-icache-coherence/src/lib.rs +++ b/crates/jit-icache-coherence/src/lib.rs @@ -41,7 +41,7 @@ //! # len: usize, //! # } //! # -//! # fn main() -> anyhow::Result<()> { +//! # fn main() -> wasmtime_environ::error::Result<()> { //! # //! # let run_code = || {}; //! # let code = vec![0u8; 64]; diff --git a/crates/jit-icache-coherence/src/libc.rs b/crates/jit-icache-coherence/src/libc.rs index c61f4bb26a60..656f66bd6787 100644 --- a/crates/jit-icache-coherence/src/libc.rs +++ b/crates/jit-icache-coherence/src/libc.rs @@ -4,7 +4,7 @@ use std::ffi::c_void; pub use std::io::Result; #[cfg(not(any(target_os = "linux", target_os = "android")))] -pub use anyhow::Result; +pub use wasmtime_environ::error::Result; #[cfg(all( target_arch = "aarch64", @@ -93,7 +93,7 @@ mod details { any(target_os = "linux", target_os = "android") )))] mod details { - // NB: this uses `anyhow::Result` instead of `std::io::Result` to compile on + // NB: this uses `wasmtime_environ::error::Result` instead of `std::io::Result` to compile on // `no_std`. pub(crate) fn pipeline_flush_mt() -> super::Result<()> { Ok(()) diff --git a/crates/jit-icache-coherence/src/miri.rs b/crates/jit-icache-coherence/src/miri.rs index 2056650aff04..f42a9293bee3 100644 --- a/crates/jit-icache-coherence/src/miri.rs +++ b/crates/jit-icache-coherence/src/miri.rs @@ -1,5 +1,5 @@ -pub use anyhow::Result; use std::ffi::c_void; +pub use wasmtime_environ::error::Result; pub(crate) fn pipeline_flush_mt() -> Result<()> { Ok(()) From 3e67519669094fbb6674a582898ffbacd1bd9b82 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Wed, 24 Dec 2025 09:20:03 -0800 Subject: [PATCH 2/2] Fix topo sort in publish script --- scripts/publish.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish.rs b/scripts/publish.rs index 9ce53d92f00d..38744e0d12d8 100644 --- a/scripts/publish.rs +++ b/scripts/publish.rs @@ -41,6 +41,8 @@ const CRATES_TO_PUBLISH: &[&str] = &[ "cranelift-native", "cranelift-object", "cranelift-interpreter", + "wasmtime-internal-component-util", + "wasmtime-environ", "wasmtime-internal-jit-icache-coherence", // Wasmtime unwinder, used by both `cranelift-jit` (optionally) and filetests, and by Wasmtime. "wasmtime-internal-unwinder", @@ -56,8 +58,6 @@ const CRATES_TO_PUBLISH: &[&str] = &[ "wasmtime-internal-error", "wasmtime-internal-versioned-export-macros", "wasmtime-internal-slab", - "wasmtime-internal-component-util", - "wasmtime-environ", "wasmtime-internal-wit-bindgen", "wasmtime-internal-component-macro", "wasmtime-internal-jit-debug",