Run world service policy in WASI init with pollable process observation

This commit is contained in:
2026-11-06 19:49:19 +00:00
parent b5462cc366
commit b39bbd4f18
21 changed files with 1821 additions and 224 deletions
+9
View File
@@ -3,6 +3,14 @@ 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};
use wasi:io/poll@0.2.12.{pollable};
enum change-kind { created, modified, removed, overflow }
record change { path: string, kind: change-kind }
resource watcher {
constructor(paths: list<string>);
subscribe: func() -> pollable;
changes: func() -> list<change>;
}
enum stdio { pipe, inherit, null }
record request {
program: string,
@@ -21,6 +29,7 @@ interface host {
stdin: func() -> output-stream;
stdout: func() -> input-stream;
stderr: func() -> input-stream;
subscribe: func() -> pollable;
status: func() -> option<s32>;
wait: func() -> s32;
kill: func();