Files
sausage/host/wit/process.wit
T
surma 57a47b069e host: process table, shell, coreutils and harness (T8, T9)
T8: sausage:process WIT (spawn, wait, kill), one store per process over the
shared root, /proc/processes, /run, pipeline and cancellation groups, Exec.
brush and 78 uutils commands; the shared cwd-init object sets the cwd from PWD
and keeps numeric exit codes. The corpus matches native bash.

T9: V8 (deno_core) runs pi-durable, pi-ai and chord; SQLite storage in
<dir>/host/harness.sqlite (WAL, synchronous=FULL); file tools on the VFS, bash
through Exec; resumes after SIGKILL.
2026-11-06 16:34:34 +00:00

30 lines
910 B
Plaintext

package sausage:process@0.1.0;
/// Programs share one world. These resources provide lifecycle and bounded stdio transport.
interface host {
use wasi:io/streams@0.2.12.{input-stream, output-stream};
record request {
program: string,
argv: list<string>,
env: list<tuple<string, string>>,
cwd: string,
/// None inherits the parent's group. Zero creates a group. A nonzero ID joins a group.
group: option<u32>,
}
resource child {
pid: func() -> u32;
group: func() -> u32;
stdin: func() -> output-stream;
stdout: func() -> input-stream;
stderr: func() -> input-stream;
status: func() -> option<s32>;
wait: func() -> s32;
kill: func();
}
spawn: func(request: request) -> result<child, string>;
kill: func(pid: u32) -> result<_, string>;
}
world program {
import host;
}