Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

wasmtime-jit-icache-coherence: Use `wasmtime_environ::error` instead of `anyhow` (#12207)

Nick Fitzgerald48f2f49aeffd
diff --git a/Cargo.lock b/Cargo.lock
index 2868317923..0d266b5e1c 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 f0ab3411ab..14a715edc8 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 a78a99ab84..2922c4d0d6 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 c61f4bb26a..656f66bd67 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 2056650aff..f42a9293be 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(())
diff --git a/scripts/publish.rs b/scripts/publish.rs
index 9ce53d92f0..38744e0d12 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",