SANYAM
SANYAMWADHWA.TECH :: PROJECT :: BEDROCK --- SUMMARY ---TITLE............. BEDROCK — A Bare-Metal OS Kernel in RustDATE.............. June 2026CATEGORY.......... SystemsPROBLEM........... Most 'OS' projects are Linux distros or userspace simulations. BEDROCK is the real thing: a kernel that talks to the hardware directly, with nothing between it and the CPU. It boots on QEMU (and bare metal) into a working GUI desktop you can click around.WHAT IT DOES...... A no_std x86_64 operating system written from scratch in Rust: no Linux underneath, no libc, just a bootloader and hardware. Boots to a graphical desktop with a window manager, a preemptive scheduler, and its own filesystem. --- RESULT ---METRIC 1.......... ~269 cycles / context switchMETRIC 2.......... ~1.34M allocator ops/secMETRIC 3.......... ~2,400x cached read speedup --- WHAT I BUILT ---HIGHLIGHT 1....... Hand-written kernel from the ground up: custom GDT/IDT/TSS, a two-stage frame allocator and virtual memory manager, and a preemptive round-robin scheduler with hand-rolled context switching at ~269 cycles per switch.HIGHLIGHT 2....... Framebuffer graphics stack with dirty-rect compositing (~47x faster than naive full redraws) driving a z-ordered window manager, PS/2 keyboard and mouse, and a SimpleFS filesystem with LRU block caching (~2,400x read speedup). --- HOW IT WORKS ---STEP 1............ BIOS BootloaderSTEP 2............ Kernel Core (GDT/IDT/TSS + exceptions)STEP 3............ Frame Allocator + Virtual Memory ManagerSTEP 4............ Preemptive Scheduler (context switch)STEP 5............ Framebuffer Compositor (dirty-rect)STEP 6............ Window Manager (z-order + hit-test)STEP 7............ PS/2 Drivers + ATA PIO DiskSTEP 8............ SimpleFS (LRU block cache)STEP 9............ Terminal / File Editor / Stats apps --- FEATURES ---FEATURE 1......... no_std, no libc, no host OS: a genuine bare-metal x86_64 kernel booted straight from a BIOS bootloaderFEATURE 2......... Two-stage physical frame allocator plus a virtual memory manager, benchmarked at ~1.34M allocations/secFEATURE 3......... Preemptive round-robin scheduler with hand-written context switching (~269 cycles per switch)FEATURE 4......... Framebuffer compositor with dirty-rect redraws (~47x faster) feeding a window manager with z-order and hit-testingFEATURE 5......... PS/2 keyboard and mouse via IRQ handlers, plus an ATA PIO driver for real disk accessFEATURE 6......... SimpleFS filesystem with LRU block caching (~2,400x read speedup), persistent across independent bootsFEATURE 7......... Ships with real apps: a terminal (ls, cat, write, rm, mv, df), a combined file browser + text editor, and a live performance-stats window --- STACK ---STACK............. Rust, no_std, x86_64, QEMU, Bare Metal --- LINKS ---CODE.............. https://github.com/SanyamWadhwa07/BEDROCKHUMAN PAGE........ https://sanyamwadhwa.tech/projects/bedrock