A minimal educational operating system written in Rust, built by following and adapting Philipp Oppermann’s Writing an OS in Rust tutorial series.
This project focuses on learning core operating system concepts while leveraging Rust’s safety guarantees. It is intentionally small, readable, and experimental.
This OS is a freestanding Rust kernel that boots on x86_64 hardware (or an emulator like QEMU). It incrementally introduces low-level systems concepts such as booting, memory management, interrupts, and basic multitasking, closely mirroring the structure and progression of the tutorial at os.phil-opp.com.
- Written in Rust (
no_std) - Bootable x86_64 kernel
- VGA text-mode output
- Keyboard and timer interrupts
- Paging and basic memory management
- Heap allocation support
- Kernel testing support
- Introductory async / task system
char-os/
├── Cargo.toml
├── Cargo.lock
├── x86_64-blog_os.json # Custom compilation target
├── src/
│ ├── main.rs # Kernel entry point
│ ├── lib.rs # Shared kernel functionality
│ ├── vga_buffer.rs # VGA text output
│ ├── serial.rs # Serial port logging
│ ├── interrupts.rs # IDT and interrupt handlers
│ ├── gdt.rs # Global Descriptor Table
│ ├── memory.rs # Paging and frame allocation
│ ├── allocator.rs # Heap allocator
│ └── task/ # Async task system
│ ├── mod.rs
│ ├── executor.rs
│ ├── simple_executor.rs
│ └── keyboard.rs
├── tests/ # Kernel integration tests
│ ├── basic_boot.rs
│ ├── heap_allocation.rs
│ ├── should_panic.rs
│ └── stack_overflow.rs
- Rust nightly toolchain
cargo- QEMU (recommended)
Run the OS:
cargo runYou should see the kernel boot.
This project is designed to teach:
- How an OS boots without an underlying operating system
- Writing bare-metal Rust with
no_std - Interrupt handling and hardware interaction
- Memory paging and heap allocation
- Structuring a small but real OS kernel
-
Writing an OS in Rust — Philipp Oppermann
-
OSDev Wiki
-
My Systems Class
- This operating system is for educational purposes only. It is not production-ready, secure, or complete.
- I am not actively maintaing this repository. Any breaking changes to Rust Nightly or any third-party library will likely go unnoticed.
- The OS is targetting x86_64 so I would recommend you check to make sure it is compatiable prior to running this OS.
I hope you like the project! 🦀