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

16 lines
631 B
Nu
Executable File

#!/usr/bin/env nu
# Cargo resolves the object path through its config, independently of each crate's directory.
def --wrapped main [...args: string] {
let include = ($args | any {|arg| $arg == 'sausage-cwd-init' })
let args = ($args | where {|arg| $arg != 'sausage-cwd-init' })
if $include {
# Resolve exit symbols before libc's archive selects its success/failure implementation.
let prefix = ($args | first 2)
let rest = ($args | skip 2)
^wasm-component-ld ...$prefix $env.SAUSAGE_CWD_INIT ...$rest
} else {
^wasm-component-ld ...$args
}
exit $env.LAST_EXIT_CODE
}