diff --git a/crates/weft-runtime/src/main.rs b/crates/weft-runtime/src/main.rs index bb74bfc..e50d4de 100644 --- a/crates/weft-runtime/src/main.rs +++ b/crates/weft-runtime/src/main.rs @@ -87,8 +87,9 @@ fn run_module( _preopen: &[(String, String)], _ipc_socket: Option<&str>, ) -> anyhow::Result<()> { - println!("READY"); - Ok(()) + anyhow::bail!( + "weft-runtime was built without the wasmtime-runtime feature and cannot execute components" + ) } #[cfg(feature = "wasmtime-runtime")] @@ -506,6 +507,14 @@ fn package_store_roots() -> Vec { mod tests { use super::*; + #[cfg(not(feature = "wasmtime-runtime"))] + #[test] + fn engine_disabled_build_refuses_to_run_components() { + let err = run_module(std::path::Path::new("app.wasm"), &[], None) + .expect_err("a build without wasmtime-runtime must not report success"); + assert!(err.to_string().contains("wasmtime-runtime")); + } + #[test] fn package_store_roots_includes_system_path() { let roots = package_store_roots(); diff --git a/docs/building.md b/docs/building.md index 96f1359..62d83a9 100644 --- a/docs/building.md +++ b/docs/building.md @@ -62,7 +62,7 @@ cargo build --release cargo build -p weft-runtime --features wasmtime-runtime,net-fetch ``` -Without `--features wasmtime-runtime`, the runtime prints READY and exits (stub mode, used in CI on platforms without Linux system dependencies). +Without `--features wasmtime-runtime`, the runtime compiles for type, lint and unit checks (the portable CI configuration) but exits with an error when asked to run a component; it never reports readiness. ## Signing packages