GLaDOS OS
An operating system written from nothing, in Rust. It boots as a UEFI application, runs its kernel in ring 0, and has a language model living inside that kernel. Inside the kernel there is no privilege boundary and no process isolation: a tool call from the model is a function call. Beside it, unmodified Linux binaries run at ring 3 on page tables of their own -- 64-bit and 32-bit, as background jobs on every core -- and since 1.4.3 Mesa does Vulkan and OpenGL on a real graphics card through a render node this kernel serves.
The tree is 313 files and about 241,000 lines of Rust, of which about 25,000 are a symbol table generated from the linker map. What was not written here is Rust core and, for fonts only, fontdue and the crates beneath it, vendored and listed in NOTICE.md. Two earlier exceptions are gone: the Realtek Wi-Fi tables taken from Linux left with their driver, and the DOOM port that found where the boundary for software written elsewhere had to be is out of the build -- the seam it forced, src/port/, is what stayed.
The structural choice
Most systems that put a model near an operating system put it in a process, hand it a shell, and let it type. That design has an interesting property: every capability the model has is mediated by text, and text has to be generated, parsed, and validated at each crossing.
Removing the privilege boundary removes the reason for any of that. The sampler can read the live applet table while it is choosing the next token, so an applet that does not exist is unreachable during generation. The model's answer is an index into a table that is already in memory. Nothing is rendered into a prompt and nothing is parsed back out.
What that costs is described plainly on the ring 0 page. There is no isolation here of any kind, and the documentation says so in every place a reader might otherwise assume otherwise.
Boot
UEFI already delivers long mode, CPL 0 and an identity map, so the UEFI application is the kernel. On the boot path there is no ELF loading, no relocation and no handoff ABI; the ELF loader that exists now is for running other people's programs rather than for starting this one. The model, the tokenizer and the root certificate bundle are read before ExitBootServices, because that is the last moment a filesystem exists. Everything after that runs on page tables the kernel built for itself.
Boot prints twenty-six self-test sections, and diag offers forty-two named suites on demand, most of them the same checks. Reading that output is the test suite, and it has caught real breakage more than once while somebody was grepping it down to the section they were working on.
What is in it
- The model. Qwen3-0.6B at int8, around 570 MB, referenced in place, with no copy on the heap. SmolLM2-135M is the small checkpoint for emulator work. Qwen3.5 hybrids load through a separate layer-major format.
- Aiksi, the system language. Everything above the kernel is written in it. Source to tokens to AST to evaluation, with an allowlist of builtins and a capability gate that fits on one screen.
- A desktop. Frutiger Aero in Aperture's colours, composed into a heap back buffer and presented by row-span diff. Paintbrush, Write and Minesweeper are real applications with their own client areas.
- A network stack from ARP up to TLS 1.3, all of it written here, with the certificate validation reporting what it established and saying so.
- Content-addressed storage on NVMe, objects named by the hash of their contents, snapshots as a single root hash, writes locked to a claimed range by default.
- A self-modification loop that proposes changes to the machine's own routing, adapters, skills and configuration, and adopts one only when four independent judges agree.
Results worth knowing about
Several of the more interesting numbers here came from measurements that contradicted a confident argument, and those are the ones worth publishing.
- The closed-form router beats the transformer at choosing tools. A ridge regression over one hidden state, 12,672 parameters, about 1.6 ms and no forward pass, with better held-out accuracy than decoding the applet name under a grammar.
- Three cores vote and their agreement is the signal. When all three agree they are right 90.3% of the time. When they split, 50%.
- The console was the dominant cost of a frame because blank cells were being painted one pixel at a time under a background that had just been filled. Fixing that took a repaint from 2,376 us to 1,629 us.
- An Aiksi step costs about 14 ns. That was measured for the first time recently, and it refuted the plan that asked for it: a routing vote spends 20 steps against a budget of 20,000, and the tree walk was never the cost. Three rounds of removing allocations made a vote 2.9 times faster.
- QEMU with the Windows hypervisor runs this about 160 times faster than emulation. Everything previously treated as needing real hardware was an untested assumption about the emulator.