Skip to content

Commit d97a607

Browse files
authored
wasmtime-fiber: use wasmtime_environ::error instead of anyhow (#12206)
1 parent 0f62967 commit d97a607

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
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();

0 commit comments

Comments
 (0)