Isolate watcher queues and selectively reload resolved service binaries

This commit is contained in:
2026-11-06 20:00:29 +00:00
parent b39bbd4f18
commit 457a966068
10 changed files with 247 additions and 44 deletions
+2 -2
View File
@@ -3,12 +3,12 @@
//! Pipe callers must drain stdout and stderr before wait to avoid bounded-pipe deadlocks.
use std::{collections::BTreeMap, io, path::{Path, PathBuf}};
mod bindings {
wit_bindgen::generate!({ path: "../../host/wit", world: "program", generate_all });
wit_bindgen::generate!({ path: "../../host/wit", world: "program", generate_all, with: { "wasi:io/poll@0.2.12": ::wasi::io::poll } });
}
use bindings::sausage::process::host;
pub use bindings::wasi::io::streams::{InputStream, OutputStream};
pub use host::{Stdio, Watcher, Change, ChangeKind};
pub use bindings::wasi::io::poll::{Pollable, poll};
pub use wasi::io::poll::{Pollable, poll};
/// Hard-stop a process group by a live process ID.
pub fn kill(pid: u32) -> io::Result<()> { host::kill(pid).map_err(io::Error::other) }