Files
sausage/host/js/bootstrap.js
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

28 lines
1.6 KiB
JavaScript

// Install Deno's native Web APIs. No Node runtime is present.
const core = Deno.core;
const expose = (path, names) => {
const exports = core.loadExtScript(path);
for (const name of names) globalThis[name] = exports[name];
};
expose('ext:deno_web/01_dom_exception.js', ['DOMException']);
expose('ext:deno_web/02_event.js', ['Event', 'EventTarget', 'MessageEvent']);
expose('ext:deno_web/13_message_port.js', ['MessageChannel', 'MessagePort']);
expose('ext:deno_web/00_url.js', ['URL', 'URLSearchParams']);
expose('ext:deno_web/02_timers.js', ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval']);
expose('ext:deno_web/03_abort_signal.js', ['AbortController', 'AbortSignal']);
expose('ext:deno_web/06_streams.js', ['ReadableStream', 'WritableStream', 'TransformStream']);
expose('ext:deno_web/08_text_encoding.js', ['TextEncoder', 'TextDecoder']);
expose('ext:deno_web/09_file.js', ['Blob', 'File']);
expose('ext:deno_web/15_performance.js', ['performance']);
expose('ext:deno_web/02_structured_clone.js', ['structuredClone']);
expose('ext:deno_web/05_base64.js', ['atob', 'btoa']);
expose('ext:deno_crypto/00_crypto.js', ['crypto']);
expose('ext:deno_fetch/20_headers.js', ['Headers']);
expose('ext:deno_fetch/21_formdata.js', ['FormData']);
expose('ext:deno_fetch/23_request.js', ['Request']);
expose('ext:deno_fetch/23_response.js', ['Response']);
expose('ext:deno_fetch/26_fetch.js', ['fetch']);
const { Console } = core.loadExtScript('ext:deno_web/01_console.js');
globalThis.console = new Console((message, level) => core.print(message, level > 1));
globalThis.process = { env: {} };