GLaDOS: an operating system in Rust with a language model in the kernel
About
GLaDOS is an operating system for x86-64, written from scratch in Rust, which boots on bare metal and runs entirely in ring 0. Its distinguishing feature is that a transformer lives in kernel space. The model is compiled into the same binary as the page tables and the disk driver, and shares an address space with both.
That arrangement deletes most of the machinery an AI agent usually needs. There is no userspace to marshal arguments into, no wire format, no dispatcher and no process boundary to cross. When the model decides to run ls, the kernel calls ls, and the call costs what any other function call costs.
What is underneath the paint is ordinary systems work. The TCP/IP stack, the TLS 1.3 client, the NVMe and xHCI drivers, the ACPI interpreter, the window manager, the system language and the inference code were all written for this project, which comes to 108 files of Rust and roughly fifty thousand lines. The name comes from Portal, and so does the look.
All downloadsLatest file releases
| Model | Context | Size | |
|---|---|---|---|
| Kernel only | — | 33 MB | Download |
| SmolLM2-135M | 512 | 133 MB | Download |
| Qwen3-0.6B | 512 | 576 MB | Download |
| Qwen3.5-2B hybrid | 512 | 1.8 GB | Download |
| Qwen3.5-2B hybrid | 8192 | 1.8 GB | Download |
| Qwen3.5-2B hybrid | 32768 | 1.8 GB | Download |
Verify what you download against SHA256SUMS. A truncated image still flashes, still boots, and then fails somewhere that has nothing to do with the truncation.
All newsLatest news
Public areas
| Download | Bootable UEFI images, kernel only through to the 2B model at a 32k context. |
| News | Release history, newest first. |
| Wiki | Twenty-five articles: every subsystem, how it works, and what it cost to find out. |
| Screenshots | The desktop, the shell, and the model answering from ring 0. |
| Archive | Mirror-style file index of images, sources and checksums. |
| Token | The planned utility token, what it would gate, and what it deliberately would not. |
| Source code | All rights reserved, published to be read. |
The numbers worth quoting
Several of these came from measurements that contradicted a confident argument, which is why they are the ones published.
| Tool routing | A ridge regression over one hidden state chooses tools better than decoding the name under a grammar, at about 1.6 ms and no forward pass. |
| Council agreement | Three cores vote, and their agreement is the signal: 90.3% correct when all three agree, 50% when they split. |
| Interpreter step | About 14 ns. A routing vote spends 20 of them against a budget of 20,000, so the tree walk was never the cost it was assumed to be. |
| A full repaint | 2,376 us down to 1,629 us, once blank console cells stopped being painted a pixel at a time over a background that had just been filled. |
| Emulation | The Windows hypervisor runs this about 160 times faster than pure emulation, which retired a long-standing belief that several things needed real hardware. |
