Skip to content

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

Fix testing `wiggle` and `wiggle-test` in isolation (#12286)

Nick Fitzgerald70b27100578b
diff --git a/Cargo.lock b/Cargo.lock
index ea622d05c4..cb0d690710 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5363,6 +5363,7 @@ dependencies = [
"thiserror 2.0.17",
"tracing",
"tracing-subscriber",
+ "wasmtime",
"wiggle",
]
diff --git a/crates/wiggle/Cargo.toml b/crates/wiggle/Cargo.toml
index 7562171971..88c12e2fc6 100644
--- a/crates/wiggle/Cargo.toml
+++ b/crates/wiggle/Cargo.toml
@@ -27,7 +27,10 @@ wasmtime-environ = { workspace = true }
wiggle-test = { path = "test-helpers" }
proptest = "1.0.0"
tokio = { version = "1", features = ["rt-multi-thread","time", "macros"] }
-wasmtime = { workspace = true }
+# Explicitly enable default features so that tests pass even testing only this
+# crate in isolation and we can't accidentally rely on cargo feature resolution
+# to enable the runtime and compiler.
+wasmtime = { workspace = true, features = ["default"] }
[[test]]
name = "atoms_async"
diff --git a/crates/wiggle/test-helpers/Cargo.toml b/crates/wiggle/test-helpers/Cargo.toml
index df2212e5f2..bcb268fd7a 100644
--- a/crates/wiggle/test-helpers/Cargo.toml
+++ b/crates/wiggle/test-helpers/Cargo.toml
@@ -25,3 +25,7 @@ thiserror = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { version = "0.3.1", default-features = false, features = ['fmt'] }
env_logger = { workspace = true }
+# Explicitly enable default features so that tests pass even testing only this
+# crate in isolation and we can't accidentally rely on cargo feature resolution
+# to enable the runtime and compiler.
+wasmtime = { workspace = true, features = ["default"] }