Skip to content

Commit 7da79ce

Browse files
authored
wasmtime-fiber: use wasmtime_environ::error instead of anyhow (#12206)
* wasmtime-fiber: use `wasmtime_environ::error` instead of `anyhow` * Fix publish script topological sorting
1 parent d9474b1 commit 7da79ce

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/fiber/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ rust-version.workspace = true
1212
workspace = true
1313

1414
[dependencies]
15-
anyhow = { workspace = true }
1615
cfg-if = { workspace = true }
16+
wasmtime-environ = { workspace = true }
1717
wasmtime-versioned-export-macros = { workspace = true }
1818

1919
[target.'cfg(unix)'.dependencies]

crates/fiber/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ extern crate std;
1313
extern crate alloc;
1414

1515
use alloc::boxed::Box;
16-
use anyhow::Error;
1716
use core::cell::Cell;
1817
use core::marker::PhantomData;
1918
use core::ops::Range;
19+
use wasmtime_environ::error::Error;
2020

2121
cfg_if::cfg_if! {
2222
if #[cfg(not(feature = "std"))] {

crates/fiber/src/nostd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ use core::cell::Cell;
3333
use core::ops::Range;
3434

3535
// The no_std implementation is infallible in practice, but we use
36-
// `anyhow::Error` here absent any better alternative.
37-
pub type Error = anyhow::Error;
36+
// `wasmtime_environ::error::Error` here absent any better alternative.
37+
pub type Error = wasmtime_environ::error::Error;
3838

3939
pub struct FiberStack {
4040
base: BasePtr,
@@ -133,7 +133,7 @@ impl Fiber {
133133
// On unsupported platforms `wasmtime_fiber_init` is a panicking shim so
134134
// return an error saying the host architecture isn't supported instead.
135135
if !SUPPORTED_ARCH {
136-
anyhow::bail!("fibers unsupported on this host architecture");
136+
wasmtime_environ::error::bail!("fibers unsupported on this host architecture");
137137
}
138138
unsafe {
139139
let data = Box::into_raw(Box::new(func)).cast();

scripts/publish.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ const CRATES_TO_PUBLISH: &[&str] = &[
5757
"wasmtime-internal-versioned-export-macros",
5858
"wasmtime-internal-slab",
5959
"wasmtime-internal-component-util",
60+
"wasmtime-environ",
6061
"wasmtime-internal-wit-bindgen",
6162
"wasmtime-internal-component-macro",
6263
"wasmtime-internal-jit-debug",
6364
"wasmtime-internal-fiber",
64-
"wasmtime-environ",
6565
"wasmtime-internal-wmemcheck",
6666
"wasmtime-internal-cranelift",
6767
"wasmtime-internal-cache",

0 commit comments

Comments
 (0)