I built a microkernel from scratch in Rust (5-part series: boot, IPC, preemption, virtual memory)

Posted by amitbahree@reddit | programming | View on Reddit | 16 comments

I had some free time between jobs and finally did something I’d wanted to do for years: build an OS kernel from scratch.

I mostly work in AI/ML these days, but I wanted to revisit the fundamentals and better understand what’s underneath the abstractions we use every day.

So I built a small microkernel in Rust and documented the journey.
By the end, it boots on an emulated ARM machine, handles task communication, supports preemptive scheduling with interrupts, and enables virtual memory with page tables + MMU.

The most interesting takeaway for me: modern systems concepts feel “magical” until you build even a minimal version yourself. Then you realize they’re just layers of careful engineering and tradeoffs.

Start here (Part 0): https://blog.desigeek.com/post/2026/02/building-microkernel-part0-why-build-an-os/

GitHub repo: https://github.com/bahree/rust-microkernel

Part 0 has links to the full 5-part series at the top and bottom if you want to follow the whole build from boot to virtual memory.

I’m not an OS expert, just sharing what I learned in case it’s useful to other curious devs. 😊