A small x86_64 operating system written in Rust that grew from an OS-dev experiment into a kernel capable of running DOOM and Quake.
RustOS is a no_std hobby operating system for x86_64 built from scratch in Rust. It uses the Limine bootloader and includes the core pieces you would expect from a tiny kernel: interrupts, memory management, preemptive multitasking, a FAT32 filesystem, a syscall layer, and userspace programs.
The project started as a way to learn low-level systems programming and turned into something much more complete and much more fun: a custom OS that can boot, schedule tasks, load programs, and run native ports of DOOM and Quake.
| Area | What it includes |
|---|---|
| Kernel | Rust no_std kernel targeting x86_64 |
| Boot | Limine boot flow and custom kernel image |
| CPU setup | GDT, IDT, interrupts, and timer-driven scheduling |
| Memory | Physical frame allocation, paging, and dynamic heap growth |
| Multitasking | Preemptive round-robin scheduler with idle task support |
| Filesystem | FAT32 support for loading apps and saving files |
| Userspace | Syscalls for display, input, timing, and filesystem access |
| Fun part | Native ports of DOOM and Quake |
RustOS uses nightly Rust and a Makefile-based workflow.
make runUseful targets:
makebuilds the kernel, apps, and bootable ISOmake runboots the OS in QEMUmake debugstarts QEMU withrust-gdb
Local tools you will need include QEMU, xorriso, mkfs.fat, and mtools.
The goal was to understand how kernels are built from the ground up while making something fun enough to stay motivating. That meant not stopping at a boot screen: the project kept growing until it supported graphics, input, files, multitasking, and real software.
The full write-up with implementation details, screenshots, and the story behind the project lives here:
AI was used to help with:
- Porting C code to Rust and generating wrappers for DOOM and Quake
- Debugging deadlocks and other low-level issues during development
- Generating some boilerplate for kernel and driver code
- AI autocompletion with Copilot during regular development
- Refactoring code for readability and maintainability
- Finding and removing dead code
- General research and learning around OS development concepts and best practices