explaingit

phil-opp/blog_os

Analysis updated 2026-06-24

17,456HTMLAudience · developerComplexity · 5/5LicenseSetup · hard

TLDR

Source code for the Writing an OS in Rust blog series, with one git branch per post covering bare-metal boot, interrupts, paging, heap, and async tasks on x86-64.

Mindmap

mindmap
  root((blog_os))
    Inputs
      Rust toolchain
      x86-64 hardware target
      QEMU
    Outputs
      Bootable kernel binary
      VGA text output
      Async task scheduler
    Use Cases
      Learn OS internals
      Rust embedded study
      Kernel hacking start
    Tech Stack
      Rust
      x86-64
      QEMU
      Cargo
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Follow the blog series step by step to build a minimal Rust kernel on x86-64

USE CASE 2

Learn how interrupts, paging, and heap allocation work in a real kernel

USE CASE 3

Use the post branches as reference points when teaching a systems programming class

USE CASE 4

Fork the project as a starting point for a hobby OS or embedded experiment

What is it built with?

Rustx86-64QEMUCargo

How does it compare?

phil-opp/blog_ostwitter/twemojidesandro/masonry
Stars17,45617,64216,705
LanguageHTMLHTMLHTML
Setup difficultyhardeasyeasy
Complexity5/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires a nightly Rust toolchain, bootimage tooling, and QEMU, expect cross-compile and linker quirks on first run.

Dual-licensed Apache 2.0 and MIT - free to use, modify, and ship in commercial products under either license with attribution.

In plain English

Blog OS is the source code and content for a blog series called "Writing an OS in Rust," hosted at os.phil-opp.com. An operating system (OS) is the foundational software that manages your computer's hardware and lets other programs run. Building one from scratch is one of the deepest exercises in programming, usually reserved for experts, this project makes that journey accessible through step-by-step tutorials. The series teaches you to build a small operating system kernel (the core of an OS that talks directly to hardware) using Rust, a modern programming language designed for safety and performance. Each blog post corresponds to a git branch in this repository, so you can check out the code at exactly the stage each post describes. The tutorials progress through several phases. It starts by creating a bare-bones program that runs without any operating system underneath it. Then it covers interrupts (how the CPU signals events like key presses), memory management (how the OS allocates and tracks memory), and eventually async/await, a programming model for running multiple tasks concurrently without traditional threads. Topics covered include VGA text mode (how to write characters to the screen at the hardware level), CPU exceptions and double faults (handling hardware errors), paging (a technique for managing memory in chunks), heap allocation (dynamic memory), and asynchronous multitasking. The project targets x86-64 hardware architecture and is written in Rust. It is dual-licensed under Apache 2.0 and MIT.

Copy-paste prompts

Prompt 1
Walk me through booting the blog_os kernel under QEMU on a Mac with Apple Silicon
Prompt 2
Explain how blog_os sets up the IDT and handles a double fault, line by line
Prompt 3
Compare the paging code in blog_os to a minimal example in xv6
Prompt 4
Add a simple serial port driver to blog_os to print debug output to the host terminal
Prompt 5
Port blog_os's async executor design into a separate no_std embedded project

Frequently asked questions

What is blog_os?

Source code for the Writing an OS in Rust blog series, with one git branch per post covering bare-metal boot, interrupts, paging, heap, and async tasks on x86-64.

What language is blog_os written in?

Mainly HTML. The stack also includes Rust, x86-64, QEMU.

What license does blog_os use?

Dual-licensed Apache 2.0 and MIT - free to use, modify, and ship in commercial products under either license with attribution.

How hard is blog_os to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is blog_os for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub phil-opp on gitmyhub

Verify against the repo before relying on details.