Skip to content

Releases: bin-inc/relay-os

Relay OS 0.6.0 — milestone 5

Choose a tag to compare

@maw629 maw629 released this 04 Oct 13:24
b67ec8b

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>&1 and 1>&2, several per command made left to right as bash makes them, on if, while, until and for too (for …; done > f), and a 2>&1 | b. A failed redirection is told where fd 2 stood. A /bin/sh whose 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, export and unset change it, A=1 cmd gives one command its own, and /bin/env shows and changes one as GNU coreutils 9.4's does (46 programs).
  • cd follows HOME, PWD and OLDPWD (cd -), ~ and the prompt follow HOME, 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's env and test compared case by case, and 52 QEMU scenarios under KVM, each followed by e2fsck.
  • NUC checks 3 to 7 (docs/hardware-test.md) passed on the NUC on 2026-10-04, on a stick written by cargo 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-usb checked 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

Choose a tag to compare

@maw629 maw629 released this 03 Oct 04:18
877b874

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, ! a and a & b mid-line, with bash's statuses. A command can continue across lines after |, && or ||: at the prompt with bash's > , in scripts and in X | sh.
  • Compound commands: if/elif/else, while, until and for (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/test and /bin/[ follow GNU coreutils 9.4's grammar rule for rule, with its messages, and answer file questions as for root (44 programs). grep -q is 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's test compared case by case, and 49 QEMU scenarios under KVM, each followed by e2fsck. 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 by cargo 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-usb checked 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

Choose a tag to compare

@maw629 maw629 released this 02 Oct 01:15
11dfc57

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 | c in one process group, through a 16 KiB pipe in frames of its own that blocks both ways; cat, wc (with -c, -l, -w), head and tail read standard input; new programs grep (literal characters, ., *, ^, $, sets; -i, -v, -n, -c), seq, sleep, true and false; X | sh runs the lines it reads. A child may join another child's group (ABI 3).
  • Jobs: cmd & and a | b & run in the background with bash's job lines; the built-ins jobs, wait and kill (%n, a pid, a whole job); /bin/ps shows each process's state, memory and CPU time; a Ctrl-C at the prompt ends a wait. Only the group that holds the console may change it.
  • Scripts and variables: sh FILE a b gives a script $0, $1 on, $#, $@; 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 by e2fsck.
  • NUC checks 3, 4 and 5 (docs/hardware-test.md) passed on the NUC on 2026-10-02, on a stick written by cargo xtask flash --full: four scripts of 84, 5, 33 and 29 commands, the steps by hand, and the error screen. cargo xtask verify-usb checked 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

Choose a tag to compare

@maw629 maw629 released this 01 Oct 02:53
08f01b7

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 a Relay note 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/sh and 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/sh and starts it again when it ends. A machine that cannot run its shell (no system.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 by e2fsck.
  • NUC checks 3 and 4 (docs/hardware-test.md) passed on the NUC on 2026-10-01, on a stick written by cargo xtask flash --full: three scripts of 84, 5 and 33 commands, the steps by hand, and the error screen. cargo xtask verify-usb checked 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

Choose a tag to compare

@maw629 maw629 released this 29 Sep 07:21
9c6ee2c

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, and reboot and poweroff leave the filesystem clean.
  • Shell: relay-sh with a line editor, history and redirection, and ls, cd, pwd, cat, head, tail, wc, stat, echo, touch, mkdir, rmdir, rm, cp, mv, df, free, dmesg, date, uname, clear, sync, reboot, poweroff, help and sh 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 by e2fsck.
  • The hardware checklist (docs/hardware-test.md) passed on the NUC on 2026-09-29, on a stick written by cargo xtask flash --full. NUC check 3 now runs from scripts on the stick, and cargo xtask verify-usb checks 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/.