Boot a Rust-built NT-compatible kernel in the browser and run real Windows binaries like cmd.exe.
Study how NT kernel internals such as IRQL, dispatcher objects, and syscalls work.
Learn low-level x86-64 concepts through a memory-safe, from-scratch kernel implementation.
Explore the nanox WebAssembly emulator as a lightweight alternative to full PC emulators.
| msuiche/nanokrnl | brain0-ai/brain0 | proxyshard/shardbrowser | |
|---|---|---|---|
| Stars | 22 | 22 | 22 |
| Language | Rust | Rust | Rust |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | — | 3/5 | 3/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
Browser demo needs an HTTP server, not file://, for the AudioWorklet backdrop to work.
nanokrnl is an experimental operating system kernel, written in Rust, that recreates the internal architecture of the Windows NT kernel, the core piece of software Windows is built on. Rather than trying to run existing Windows drivers, the goal is to rebuild the same internal building blocks, data layouts, and constants that NT uses, but in a modern language designed to prevent whole classes of memory safety bugs common in low level code. It boots on real x86-64 hardware and can run actual, unmodified Microsoft programs such as cmd.exe, the Windows command prompt, and more.com, using its own from-scratch implementation of the underlying NT system calls those programs rely on. What makes the project unusual is that it also boots inside a web browser. The author built a companion project called nanox, a compact emulator written in Rust and compiled to WebAssembly, only about 60 kilobytes in size. Instead of emulating an entire generic PC from power on the way larger browser emulators do, nanox boots the kernel directly in 64-bit mode and only emulates the small handful of hardware devices the kernel actually needs, such as a serial port, a keyboard controller, and a timer chip. Because of this narrow scope, the browser demo can run from any ordinary web server without the special security headers that heavier in-browser emulators usually require. Every time the kernel boots, whether under the emulator QEMU or in the browser, it prints a startup banner and runs a suite of self tests that check things like memory allocation, event synchronization, and device input and output, reporting whether each one passed. The project describes its faithfulness to NT in layers. Some pieces are exact matches with how real NT works internally, such as status codes, string formats, and the selector layout used by the processor. Other pieces are faithful in overall shape and behavior without matching Windows byte for byte, such as how the kernel dispatches driver requests or manages background work. Throughout the codebase, the parts that must bypass Rust's normal safety checks are kept narrow and explicitly documented, so entire categories of bugs common in traditional kernel code are prevented by the compiler. The codebase is organized into subsystems that mirror the layout of the real Windows kernel, covering memory management, scheduling, object handling, process and thread creation, drivers and input/output, and a loader for Windows executable files. It is aimed at people interested in operating systems, emulation, and reverse engineering who want to see a real kernel architecture rebuilt from scratch in a memory-safe language.
A Rust rewrite of the Windows NT kernel architecture that boots real Microsoft binaries in QEMU or directly in your browser.
Mainly Rust. The stack also includes Rust, WebAssembly, x86-64.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.