Skip to content

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

test-util: Use `wasmtime_environ::error` instead of `anyhow` (#12209)

Nick Fitzgeraldcd4657b2af48
diff --git a/crates/test-util/Cargo.toml b/crates/test-util/Cargo.toml
index 9350d75591..36b2b31a2c 100644
--- a/crates/test-util/Cargo.toml
+++ b/crates/test-util/Cargo.toml
@@ -21,7 +21,7 @@ arbitrary = { workspace = true, optional = true }
quote = { workspace = true, optional = true }
proc-macro2 = { workspace = true, optional = true }
wasmtime-component-util = { workspace = true, optional = true }
-wasmtime-environ = { workspace = true, optional = true }
+wasmtime-environ = { workspace = true }
target-lexicon = { workspace = true, optional = true }
env_logger = { workspace = true, optional = true }
wasmtime = { workspace = true, optional = true }
@@ -46,7 +46,6 @@ wast = [
'dep:serde_derive',
]
wasmtime-wast = [
- 'dep:wasmtime-environ',
'wast',
'dep:wasmtime',
'wasmtime/cranelift',
diff --git a/crates/test-util/src/component.rs b/crates/test-util/src/component.rs
index 7338544515..aa921af1f2 100644
--- a/crates/test-util/src/component.rs
+++ b/crates/test-util/src/component.rs
@@ -1,4 +1,3 @@
-use anyhow::Result;
use arbitrary::Arbitrary;
use std::mem::MaybeUninit;
use wasmtime::component::__internal::{
@@ -6,6 +5,7 @@ use wasmtime::component::__internal::{
};
use wasmtime::component::{ComponentNamedList, ComponentType, Func, Lift, Lower, TypedFunc, Val};
use wasmtime::{AsContextMut, Config, Engine};
+use wasmtime_environ::error::Result;
pub trait TypedFuncExt<P, R> {
fn call_and_post_return(&self, store: impl AsContextMut<Data: Send>, params: P) -> Result<R>;
diff --git a/crates/test-util/src/wast.rs b/crates/test-util/src/wast.rs
index 30da506dbf..f32eaa271a 100644
--- a/crates/test-util/src/wast.rs
+++ b/crates/test-util/src/wast.rs
@@ -1,10 +1,10 @@
-use anyhow::{Context, Result};
use serde::de::DeserializeOwned;
use serde_derive::Deserialize;
use std::fmt;
use std::fs;
use std::path::Path;
use std::path::PathBuf;
+use wasmtime_environ::error::{Context, Result};
/// Limits for running wast tests.
///