Merge v3-t39: Rust builder behind host.sausage/cargo and the world cargo CLI (T39, P4)

# Conflicts:
#	flake.nix
#	host/src/process/mod.rs
#	host/tests/hook_git.rs
#	host/tests/hook_guest.rs
#	host/tests/process.rs
#	userland/Cargo.toml
This commit is contained in:
2026-11-07 14:48:35 +00:00
28 changed files with 1710 additions and 13 deletions
+8 -3
View File
@@ -45,9 +45,14 @@ impl WasiHttpHooks for Hooks {
.is_some_and(|h| h.eq_ignore_ascii_case("host.sausage"))
{
let bytes = body.collect().await?.to_bytes();
return Ok(response(
crate::api::handle(&router, caller, Request::from_parts(parts, bytes)).await,
));
let request = Request::from_parts(parts, bytes);
if request.method() == http::Method::POST && request.uri().path() == "/cargo" {
return Ok((
crate::api::stream(&router, request),
Box::new(async { Ok(()) }) as Io,
));
}
return Ok(response(crate::api::handle(&router, caller, request).await));
}
if !matches!(parts.uri.scheme_str(), Some("http" | "https")) {
while let Some(frame) = body.frame().await {
+4
View File
@@ -193,6 +193,10 @@ impl Runtime {
)?),
};
router.attach_journal(world.root.journal());
let _ = router.builder.set(Arc::new(crate::builder::Builder::new(
world.root.clone(),
&world.host_dir,
)?));
let network = Arc::new(net::NetPolicy::open(&world.host_dir)?);
let engine = compiler.engine.clone();
let alive = Arc::new(AtomicBool::new(true));