Skip to content

Architecture

fishbowl is built in four layers. Each layer depends only on the one below it.

Kernel — The only privileged code. Manages the process table, routes I/O through the virtual filesystem, handles file descriptors, signals, and pipes. Knows nothing about fileserver implementations.

Runtime — The shell interpreter, init system, package manager, and WASM execution host. Builds on the kernel’s syscall surface. Provides the Unix() builder API for composing systems.

Bins — The standard library of executable commands: coreutils, text tools, file tools, process tools, system tools. Each bin is a pure function (proc: ProcContext) => Promise<ExitCode>.

.build() — Freezes extensions into an immutable Image. The image is a snapshot; no further changes are possible after this point.

.boot(runtime) — Starts the init system on top of the image, adding a writable overlay layer. Returns a live Instance you can interact with. Each .boot() call produces an independent instance.

Packages — JS bundles and WASM binaries evaluated into a running image by the package manager. Packages operate at the runtime layer and extend it dynamically.

ComponentWhat it does
KernelProcess table, spawn, signals, pipes, fd routing
FileserversVFS protocol, memoryFS, overlayFS, srvFS, namespaces
StreamsAsync readable/writable stream primitives
PipesKernel-managed pipe pairs, refcounting
InodesINode model, mode, uid, exec bit
ErrorsError taxonomy, POSIX errno mapping
LoggingKernelLog ring buffer, dmesg, TRACE env var
ComponentWhat it does
ShellPOSIX interpreter, parser, builtins, expansion
RuntimePlatform abstraction, boot, PlatformCapabilities
ContainerProcess-level isolation, layered image model
InitDependency graph, supervisor, restart policies
PackagesRegistry, semver resolver, JS + WASM evaluator
AdaptersHost adapters: Node.js, browser, test
ComponentWhat it does
BinsStandard library of executable commands
ComponentWhat it does
BootstrapBoot sequence, image construction
Developer APIPublic API surface, Extension model