summaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-08-21 17:18:09 +0200
committersalmonik <salmonik@tuta.io>2026-08-21 17:18:09 +0200
commitfc4c563ca14ddec3de3aeef5a861f9707eaae389 (patch)
treee88483e79ca3ca6d980cdbf984cf9278ccef1d27 /CONTEXT.md
parentwm: fix usize underflow in move_window at screen edges (diff)
downloadrs-dos-fc4c563ca14ddec3de3aeef5a861f9707eaae389.tar.gz
rs-dos-fc4c563ca14ddec3de3aeef5a861f9707eaae389.zip
docs: ADR 0006 (executable binaries) + implementation plan + glossary terms
ADR 0006: PE32+ loader in rsnix, versioned exports-table ABI constructed per invocation, task-per-binary, single dd-able system image with /bin/cli and /bin/gui, shell-owned grammar with injected line streams, per-terminal input discipline as prerequisite phase, frozen built-in core, 0.6.0 at first exec. Plan: five phases (image → input discipline → loader/exec → streams + migration → GUI binaries), each with a QEMU verification gate. Glossary: Binary, Loader, Exports table, System image; kind = launch surface.
Diffstat (limited to '')
-rw-r--r--CONTEXT.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/CONTEXT.md b/CONTEXT.md
index c27f059..01f5c69 100644
--- a/CONTEXT.md
+++ b/CONTEXT.md
@@ -116,6 +116,41 @@ message queue. A GUI program is an app; there is no separate "process"
116concept — the app is its task plus its window. The home terminal is app 0 116concept — the app is its task plus its window. The home terminal is app 0
117(window 0). 117(window 0).
118 118
119## Binary
120
121A PE32+ file holding executable code that the kernel can load and run
122without being recompiled into the kernel image. A binary runs against
123the kernel's exported interface, never by linking kernel state directly.
124Binaries come in two kinds, separated by **launch surface** rather than
125implementation: **CLI binaries** live in /bin/cli and run inside a
126terminal session (invoked by a shell, inheriting its input/output);
127**GUI binaries** live in /bin/gui and are launchable with no terminal at
128all — they own their windows — which makes enumerating launchable apps
129as simple as listing /bin/gui. Every binary runs as its own task — a CLI binary's task is
130waited on by the calling terminal, a GUI binary's task owns its window.
131
132## System image
133
134The single dd-able FAT filesystem image the build produces: bootloader,
135kernel, /bin, /etc and seed content on one volume. Imaging it onto a disk
136yields a complete installed system. Binaries live on the system image
137under /bin/cli and /bin/gui; the shell finds them by scanning mounted
138volumes — no volume is privileged.
139
140## Loader
141
142The kernel facility that takes a binary from disk, places it in memory,
143and starts it. Loading changes no address-space setup — binaries run in
144the one shared identity-mapped space.
145
146## Exports table
147
148The interface between a binary and the kernel: a versioned table of
149functions the kernel hands to a binary at entry (output, filesystem,
150memory, …). The caller constructs it per invocation, so the same binary's
151output can be aimed at a terminal or into the shell's filter pipeline.
152All kernel state stays behind the table — a binary never owns a copy of it.
153
119## Terminal 154## Terminal
120 155
121A program that presents a command line in a window: a text terminal 156A program that presents a command line in a window: a text terminal