mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-11-22 08:13:59 +00:00
Merge branch 'fix/runtime-stub-readiness' into fix/enforce-session-grants
This commit is contained in:
commit
f41937bd7e
2 changed files with 12 additions and 3 deletions
|
|
@ -97,8 +97,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")]
|
||||
|
|
@ -516,6 +517,14 @@ fn package_store_roots() -> Vec<PathBuf> {
|
|||
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();
|
||||
|
|
|
|||
|
|
@ -94,7 +94,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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue