Files
sausage/userland/cwd-init/build.nu
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

10 lines
592 B
Nu

#!/usr/bin/env nu
# Build the shared startup object and describe its standard WASI numeric-exit import.
def main [] {
let here = $env.FILE_PWD
^wasm-tools component embed ($here | path join exit.wit) --only-custom -o ($here | path join exit-meta.bin)
if $env.LAST_EXIT_CODE != 0 { error make {msg: 'startup metadata failed'} }
^rustc ($here | path join init.rs) --edition 2024 --crate-type lib --emit=obj --target wasm32-wasip2 -C opt-level=s -C panic=abort -o ($here | path join init.o)
if $env.LAST_EXIT_CODE != 0 { error make {msg: 'startup object compile failed'} }
}