Repository navigation
Releases: bin-inc/relay-os
Release list
Relay OS 0.6.0 — milestone 5
Milestone 5 of Relay OS, an operating system written from scratch in Rust, and the end of its programmable shell gate: /bin/sh redirects every stream and gives programs an environment.
What it does
- Redirection:
<,>,>>,2>,2>>,2>&1and1>&2, several per command made left to right as bash makes them, onif,while,untilandfortoo (for …; done > f), anda 2>&1 | b. A failed redirection is told where fd 2 stood. A/bin/shwhose own output is a file or a pipe (X | sh > f) writes its built-ins' output there. /dev/null, in a filesystem of the kernel's mounted at/dev.- Environments (ABI 4): every program gets one. The shell imports its own,
exportandunsetchange it,A=1 cmdgives one command its own, and/bin/envshows and changes one as GNU coreutils 9.4's does (46 programs). cdfollowsHOME,PWDandOLDPWD(cd -),~and the prompt followHOME, and the check scripts pass from any directory.- Decided differences from bash are listed in the design's §10. What this shell does not have yet is refused as unsupported syntax.
Tested
cargo xtask test: host unit tests, including a bash corpus and GNU'senvandtestcompared case by case, and 52 QEMU scenarios under KVM, each followed bye2fsck.- NUC checks 3 to 7 (
docs/hardware-test.md) passed on the NUC on 2026-10-04, on a stick written bycargo xtask flash --full. Six scripts of 85, 6, 34, 30, 47 and 39 commands passed, along with the steps by hand and the error screen. Check 7 ran redirection and the environment, started in/root/checks.cargo xtask verify-usbchecked their transcripts.
Try it
See the quick start in README.md. At the prompt: ls /nope 2>&1 | wc -l, export A=1; env, B=2 env | grep B, cd /bin; cd -, echo hi > /dev/null.
Design: docs/superpowers/specs/2026-10-02-programmable-shell-gate-design.md (milestones 4 and 5). Milestone 5's four plans are in docs/superpowers/plans/.
Relay OS 0.5.0 — milestone 4
Milestone 4 of Relay OS, an operating system written from scratch in Rust, and the first half of its programmable shell gate: /bin/sh is a shell one can program in.
What it does
- Lists:
a; b,a && b,a || b,! aanda & bmid-line, with bash's statuses. A command can continue across lines after|,&&or||: at the prompt with bash's>, in scripts and inX | sh. - Compound commands:
if/elif/else,while,untilandfor(over words or"$@"), nested up to 32 levels, typed across lines or on one. Ctrl-C ends a loop of programs or of built-ins. A script's construct is traced line by line before it runs. A refused command is dropped whole, its groups, subshells and arithmetic included. - Conditions:
/bin/testand/bin/[follow GNU coreutils 9.4's grammar rule for rule, with its messages, and answer file questions as for root (44 programs).grep -qis new. - Decided differences from bash are listed in the design's §10: no word splitting, no quote continuing across lines, no compound commands in pipelines or with
&, and a few more. What this shell does not have yet is refused as unsupported syntax.
Tested
cargo xtask test: host unit tests, including a bash corpus and GNU'stestcompared case by case, and 49 QEMU scenarios under KVM, each followed bye2fsck. Every scenario's input waits for its prompt.- NUC checks 3 to 6 (
docs/hardware-test.md) passed on the NUC on 2026-10-03, on a stick written bycargo xtask flash --full: five scripts of 84, 5, 33, 29 and 46 commands, the steps by hand, and the error screen. Check 6 ran 100 commands in 5 seconds.cargo xtask verify-usbchecked their transcripts.
Try it
See the quick start in README.md. At the prompt: for x in a b c; do echo $x; done, if [ -f /bin/ls ]; then echo yes; fi, while true; do sleep 1; done and Ctrl-C.
Design: docs/superpowers/specs/2026-10-02-programmable-shell-gate-design.md (milestones 4 and 5). Milestone 4's four plans are in docs/superpowers/plans/.
Relay OS 0.4.0 — milestone 3
Milestone 3 of Relay OS, an operating system written from scratch in Rust, and the end of its user-space gate: the programs of milestone 2 are connected. Commands are joined by pipes, run in the background, listed and killed, and scripts take arguments and variables.
What it does
- Pipes:
a | b | cin one process group, through a 16 KiB pipe in frames of its own that blocks both ways;cat,wc(with-c,-l,-w),headandtailread standard input; new programsgrep(literal characters,.,*,^,$, sets;-i,-v,-n,-c),seq,sleep,trueandfalse;X | shruns the lines it reads. A child may join another child's group (ABI 3). - Jobs:
cmd &anda | b &run in the background with bash's job lines; the built-insjobs,waitandkill(%n, a pid, a whole job);/bin/psshows each process's state, memory and CPU time; a Ctrl-C at the prompt ends await. Only the group that holds the console may change it. - Scripts and variables:
sh FILE a bgives a script$0,$1on,$#,$@;NAME=value,$NAME,${NAME}and$?at the prompt and in scripts; a value is never split into words (unlike bash); what bash does that this shell does not is refused as unsupported syntax.
Tested
cargo xtask test: host unit tests and 47 QEMU scenarios under KVM, each followed bye2fsck.- NUC checks 3, 4 and 5 (
docs/hardware-test.md) passed on the NUC on 2026-10-02, on a stick written bycargo xtask flash --full: four scripts of 84, 5, 33 and 29 commands, the steps by hand, and the error screen.cargo xtask verify-usbchecked their transcripts.
Try it
See the quick start in README.md. At the prompt: seq 1000 | grep 7 | wc -l, t-spin &, jobs, ps, kill %1.
Design: docs/superpowers/specs/2026-09-29-user-space-gate-design.md (milestones 2 and 3); milestone 3's four plans are in docs/superpowers/plans/.
Relay OS 0.3.0 — milestone 2
Milestone 2 of Relay OS, an operating system written from scratch in Rust: the shell and every command left the kernel. They are programs in ring 3, each in its own address space, loaded from a read-only /bin, so a program that crashes is killed and the shell carries on, and a busy program shares the CPU with the rest.
What it does
- Programs:
system.img, a read-only archive on the ESP that the loader brings in, is mounted at/bin. Programs are static ELF files with aRelaynote naming the ABI, checked by the build and by the kernel alike, and run in ring 3 with SMEP, SMAP and their own page tables. - Processes: a process table and a round-robin scheduler with preemption on the 1 kHz tick, blocking, an idle task, process groups, the console's foreground group, Ctrl-C and
kill. A fault in ring 3 ends only that program, with bash's status and a message saying why. - The Relay ABI: its own system calls (not Linux's) for processes, files, memory, the console, tees, system information and power, with
relay-rt, the runtime every program is built on (start-up, a heap, and the shell's traits over the calls). - The console: a line discipline (echo, Backspace, Ctrl-D), raw and line modes, and tees, which copy what the console shows into a file: a script's transcript.
- The shell:
/bin/shand one program per command, printing exactly what milestone 1's built-in commands printed; scripts run as nested shells with their transcripts. - Process 1 is the kernel's init: it starts
/bin/shand starts it again when it ends. A machine that cannot run its shell (nosystem.img, a damaged one, or a shell that keeps ending) shows an error screen that says why and restarts at a key.
Tested
cargo xtask test: host unit tests and 41 QEMU scenarios under KVM, each followed bye2fsck.- NUC checks 3 and 4 (
docs/hardware-test.md) passed on the NUC on 2026-10-01, on a stick written bycargo xtask flash --full: three scripts of 84, 5 and 33 commands, the steps by hand, and the error screen.cargo xtask verify-usbchecked their transcripts.
Try it
See the quick start in README.md: cargo xtask test and cargo xtask qemu for QEMU; cargo xtask flash --full for the stick. At the prompt, ls /bin lists the programs.
Design: docs/superpowers/specs/2026-09-29-user-space-gate-design.md (milestones 2 and 3); the seven plans of milestone 2 are in docs/superpowers/plans/. Milestone 3 (pipes, background jobs, ps and kill, script variables) comes next, as 0.4.0.
Relay OS 0.2.0 — milestone 1
Milestone 1 of Relay OS, an operating system written from scratch in Rust: an Intel NUC 12 Pro boots from a USB stick, shows a terminal over HDMI, and takes Linux-style commands on a USB keyboard to create, read, change and delete files, which stay on the stick across reboots.
What it does
- Boot: its own UEFI loader (
relay-boot) hands off to a higher-half kernel; the terminal uses the firmware's framebuffer at the monitor's native resolution, and every startup step prints[ ok ]or[FAIL] <step>: <reason>. - Kernel core: frame allocator, heap, kernel page tables, ACPI tables (reset and S5 power-off), TSC/HPET/LAPIC timer, CMOS clock, PCI.
- USB: an xHCI driver (BIOS handoff, scratchpads, USB 2 and 3 ports, hot-plug), the HID boot keyboard with a US layout, and mass storage over Bulk-Only Transport and SCSI with error recovery.
- Files: GPT, an ext2 driver with a write-back block cache, a VFS, and
/mounted from the stick; every command is synced when it ends, andrebootandpoweroffleave the filesystem clean. - Shell:
relay-shwith a line editor, history and redirection, andls,cd,pwd,cat,head,tail,wc,stat,echo,touch,mkdir,rmdir,rm,cp,mv,df,free,dmesg,date,uname,clear,sync,reboot,poweroff,helpandsh FILE, which runs a file of commands and writes a transcript of everything it shows.
Tested
cargo xtask test: host unit tests (including filesystem tests against the real e2fsprogs) and 20 QEMU scenarios, each followed bye2fsck.- The hardware checklist (
docs/hardware-test.md) passed on the NUC on 2026-09-29, on a stick written bycargo xtask flash --full. NUC check 3 now runs from scripts on the stick, andcargo xtask verify-usbchecks their transcripts.
Try it
See the quick start in README.md: cargo xtask test and cargo xtask qemu for QEMU; cargo xtask flash --full for the stick.
Design: docs/superpowers/specs/2026-09-26-milestone-1-boot-shell-fs-design.md; the six plans that built it are in docs/superpowers/plans/.