NEXUS OS: from a single-file dashboard to a verified Rust kernel seed
On this page
NEXUS started as a workstation dashboard for a wide monitor. It did not start as an operating system. Yet once I had spent enough time building a live developer shell where the desktop is the workspace rather than a wallpaper with icons, the obvious next question showed up: what would it take to own the whole stack underneath it, honestly, one verified step at a time?
Today the workspace has two distinct layers that never pretend to be each other: a hosted local developer shell (including two dashboard foundations and an interactive Architecture Atlas), and a separate no_std Rust kernel seed under native/ that boots in QEMU with zero third-party crates.
Two dashboards and a rule about honesty
Before any kernel code existed, there were two local dashboards:
- NEXUS-9, a single self-contained HTML file (
dist/nexus9.html) with 69 tiles across six groups — clocks and real solar/lunar ephemeris, browser capability telemetry, JSON/regex/JWT/cron/diff/colour workbenches, generative canvases including a globe with a real solar terminator, a pure-JavaScript QR encoder, and synthetic feeds. Zero network calls, zero dependencies. - NEXUS-OPS, a loopback-only local Python agent (
127.0.0.1:8770) reporting real 2-second host telemetry: per-core CPU, memory, drives, network rates, listening ports with dev-server detection, git state across repos, and local Ollama / LM Studio discovery.
The rule that carried straight from the dashboard into the OS work was simple: never fake liveness. In NEXUS-9, tiles reading real browser APIs carry a LIVE badge, computed astronomy carries CALC, and synthetic feeds carry SIM. The test suite (verify.py) runs 112 core-logic checks — verifying expression precedence, WCAG contrast, and solar/lunar ephemeris against solstice day lengths at 41°N and polar day at Svalbard — plus 66 QR tests checking ISO 18004 format/version tables and Reed-Solomon error correction through a scanner-style round-trip decode. Those tests exist specifically for silent failures: a wrong solar declination or a broken QR code renders cleanly and is simply wrong.
Keeping the map separate from the territory
As NEXUS grew into a hosted first slice of an AI-native shell — declarative tile manifests, focused HOME/AI/SYSTEM/DEV/ALL workspaces, and an interactive Architecture Atlas — the temptation was to blur planned native OS subsystems together with hosted Python/browser reference code.
The Atlas refuses to do that. You can click from the whole OS down into any subsystem to read its rationale, trust boundaries, contracts, ADRs, evidence, and tests, and every node explicitly distinguishes planned native code from implemented hosted reference code. Similarly, the hosted AI Command Center deliberately does not install generated code yet; extension installs stay gated behind a future propose → validate → preview → approve → install → undo pipeline.
The no_std Rust kernel seed
The actual native OS slice lives in native/ on a completely separate target graph. Following a strict learning-first dependency boundary (ADR 0004), it contains zero registry or Git crates — only NEXUS-authored no_std boot, ABI, and kernel crates plus compiler-provided core and builtins.
Step by step (R0.2e through R0.2ab), the x86-64 vertical slice grew real mechanics:
- Boot and handoff: A deterministic UEFI loader validates a separately packaged, relocatable
KERNEL.NXKand FAT16 boot image, then enters the kernel across a sealed memory-map /ExitBootServiceshandoff. Corrupt-artifact tests (artifact-test) prove the loader rejects an unsealed kernel payload, a resealed PE with a zero entry point, and an unsealed package before kernel entry. - Ownership before switching: The kernel emits structured serial and panic records, initializes an explicit physical-frame ownership allocator, installs a 32-vector x86-64 exception table, copies and adopts an owned GDT with checked
LGDT/SGDTreadback, pivots onto an 18-page owned stack (16 usable pages flanked by poisoned future-guard slots), and carves a 4 KiB bootstrap heap (256 sixteen-byte units, at most 32 live allocations, zero-on-reuse) out of an already-owned data page. - Exceptions and real faults: Terminal crash reports were fixed to read the exact
RSPsaved by the CPU, verified with a deliberately unaligned pre-fault witness. Separate terminal-only test images activate an original TSS/IST workspace (ist-test) and intentionally read a zero root-table slot (pf-test) to observe real vector 14, error code 0, and exactCR2on IST1 rather than assuming a zero table slot proves a fault. - Cooperative switching and interrupt prep: After building a checked FIFO scheduler policy and Win64 context geometry, two fixed assembly workers actually start, yield, block, resume, and exit across eight live transfers on separate retained 64 KiB stacks in QEMU (
cooperative-switch-test). Subsequent checkpoints proved a same-privilegeINT3/IRETQreturn, observed a polled local-APIC timer countdown withIF=0, and encoded a full 256-vector IDT specification.
Proving what is done — and what is still blocked
The single habit that kept this project grounded is refusing to let a milestone overclaim.
When checkpoint R0.2j constructed a complete 32-frame inactive page-table candidate covering the kernel image, owned stack, GDT, continuing state, framebuffer, and ACPI window, it wrote and read back every owned frame — and then left CR3 untouched and kept all four activation blockers explicitly open. An immutable receipt is historical evidence, not permission to flip a hardware switch prematurely.
Every kernel proof requires two fresh matching QEMU/OVMF boots against hash-pinned harness files before a compiled image counts as verified. A separate polled i8042 PS/2 probe can paint a synthetic key press onto the native boot visual, and the README says plainly what it is not: no text buffer, no inputd, no compositor, and no physical-hardware keyboard support yet.
That gap between a working hosted shell and a verified kernel seed is wide — and writing down exactly where the line sits is the only way a hobby OS stays real engineering instead of sci-fi.
