Five days ago, Rustux was a UEFI stub that printed a banner and exited. Today it's a working kernel — written entirely in Rust, from scratch, with no Linux code — that boots into GNU bash, runs BusyBox and dynamically linked ELF binaries, executes native Windows .exe files without a single line of Wine, and speaks a brand-new internet protocol on a real e1000e NIC. This is why it exists, and why it matters.
The idea: port the kernel, not just enable Rust in it
The Linux kernel is ~30 million lines of C, grown over 34 years. Rust-in-Linux lets you write drivers in Rust, but the core stays C — the allocator, the scheduler, the page tables, the syscall table. Rustux asks a different question: what does the kernel actually do, specified by its ABI, and can we rebuild all of it in Rust from zero?
So we're doing exactly that. Survey what Linux requires subsystem by subsystem, implement it in Rust with matching semantics and errno values, and prove it with real userspace binaries — not toy shells. The result already includes:
- Boot to userspace: UEFI boot, own GDT/IDT, page tables, buddy allocator + slab heap, ACPI/LAPIC/I-APIC interrupt routing, PCI.
- The real Linux ABI: 120+ syscalls, ELF and static-PIE loading, dynamically linked binaries through PT_INTERP/ld.so, fork/execve/waitpid, signals, mmap/brk, pipes, sockets, epoll, eventfd, timerfd, signalfd, inotify, futexes, vfork, process groups, sessions, and terminal job control.
- Real userspace: Debian dash, GNU bash 5.2 (job control, &, jobs, kill %1 all work), and BusyBox running unmodified.
- A real VFS: flat filesystem, symlinks, /proc, getdents64 with d_type, inotify.
- Real networking: an e1000e driver with DMA rings and MSI-X, UDP and TCP.
- IPv8: the first kernel to speak the draft Thain IPv8 protocol on the wire — 32-bit route numbers, EtherType 0x8080. Experimental, not a replacement for IPv6, but it's a first.
The suite that gates every change is 62 compiled test tasks that must run back-to-back in QEMU with zero frame leaks and a clean exit — kernel memory accounting is verified after every boot, not assumed.
The second personality: native Windows .exe, no Wine
Here's the part that surprises people. Rustux doesn't just speak Linux. It also speaks NT — natively, in the kernel.
Wine works by translating every Windows API call through a giant userspace compatibility layer, because Linux only understands Linux syscalls. Rustux takes a different route: the kernel itself owns a Windows syscall table. When a PE binary runs, it gets a TEB and a PEB, NTSTATUS return codes, a real NT handle table, process and thread objects with Windows wait semantics — the actual NT execution model, not an emulation of it.
The Win32 API surface is then a thin marshalling layer: CreateProcessA, CreateThread, WaitForSingleObject, GetExitCodeProcess, VirtualAlloc, CreateFileMapping + MapViewOfFile, LoadLibrary with full DllMain attach/detach lifecycle, TLS callbacks, FLS slots, GetSystemInfo, QueryPerformanceCounter, and the file/directory APIs. A real MinGW-compiled .exe runs unmodified — our test fixtures are ordinary x86_64-w64-mingw32-gcc output.
One kernel, two personalities, selected per binary. No Wine tower, no userspace shim — the kernel is the compatibility layer.
Why this is a good thing
Memory safety at the core, not the edges. The entire kernel is #![no_std] Rust. Use-after-free, buffer overflows, and whole classes of memory-corruption CVEs are structurally impossible in safe code — and where unsafe is required (page tables, port I/O, context switch), the boundary is explicit and auditable.
The ABI is the spec. Because we implement against documented behavior rather than porting code, every divergence is a deliberate, recorded decision — the repository keeps a running CVE matrix mapping each subsystem to the vulnerability classes it's hardened against (121 tracked entries and counting, audited every rung).
A kernel that can outgrow Linux's monoculture. Dual personality means the same safe core serves two ecosystems — and the architecture admits a third, a fourth. IPv8 shows the stack isn't locked to today's protocol decisions either.
It's honest. Every gap is documented — divergences are recorded, not hidden. This isn't a claim of feature-parity; it's a method for getting there one verified rung at a time.
Five days from banner to bash-and-.exe. The destination is a drop-in Linux replacement in memory-safe Rust — with Windows binaries as first-class citizens. The roadmap is public, every rung is tested, and the code is on GitHub.
github.com/rustuxdev/Rustux
Top comments (0)