A minimal x86_64 operating system written in Rust, based on a tutorial from https://os.phil-opp.com/.
Rusty OS is an educational OS project demonstrating low-level systems programming in Rust. It includes a bootloader, interrupt handling, memory management with custom allocators, and async/await task execution without the standard library.
- Bootloader Integration - Uses bootloader crate for x86_64 boot sequence
- Global Descriptor Table (GDT) - CPU privilege levels and task switching
- Interrupt Handling - IDT setup with handlers for exceptions and hardware interrupts
- Memory Management - Virtual memory mapping with custom frame allocator
- Heap Allocation - Multiple allocator strategies:
- Bump allocator
- Linked list allocator
- Fixed-size block allocator
- Async Runtime - Custom task executor with async/await support
- Keyboard Input - Async keyboard handler via PS/2 controller
- VGA Text Buffer - Text-based console output with macros (
print!,println!) - Serial Output - UART for debug logging
- Testing Framework - Built-in test runner for kernel testing
- Rust nightly toolchain
- QEMU (for running the OS unless you wish to actually boot this... Please do not)
bootimagetool:cargo install bootimage# This should not be run from the project folder
Build the kernel image:
cargo build --releaseCreate a bootable image:
cargo bootimage --releaseRun in QEMU:
cargo run --releaseRun the test suite:
cargo testIntegration tests are located in tests/ directory:
basic_boot.rs- Kernel startupheap_allocation.rs- Memory allocationstack_overflow.rs- Stack protectionshould_panic.rs- Panic handling
- File system implementation (FAT32 or ext2)
- ELF binary loading and execution
- User-space process isolation
- System call interface
- Device driver framework
- Networking stack
- Better console with colors and scrolling