Build · Rust · Apple Silicon
Build a VMM from scratch.
Write a virtual machine monitor in Rust on top of Apple's Hypervisor.framework, then boot Linux on it. No QEMU underneath: every exit, device and interrupt is code you wrote and can read.
What you'll build
What you need
Needs a Mac
A Mac with Apple Silicon (Apple M1 or later) on macOS 15 or later, with Xcode command-line tools and Rust, for the chapters that run your VMM. Tested only on macOS 27.2 on an M5 Pro; older ones are expected to work. The code is on GitHub, and chapter 00 shows how to get it.
Runs in a browser
Reading, the primers and the labs need only a browser. Labs run entirely on your machine; nothing is uploaded.
You should know
Some Rust or C, what a process and a memory address are, and a terminal. No virtualization or ARM background needed: Part 0 starts from zero.
How it works
Real code
Every block of reference VMM code, headed by its file path and line numbers, is pulled from the repository when the site is built, never pasted, so it cannot drift.
Predict, then reveal
Each chapter asks you to commit to a guess before it shows the answer, and breaks things on purpose so you see why they work.
A test you run
Every chapter ends with a checkpoint: one command and the exact output you should see. Every block labelled Terminal is a captured run, and its footer says where it came from.
Curriculum
Part 0What a virtual machine is, and where ours sits
Part IThe bare machine, first VM exit
Part IIMemory
Part IIIA CPU that runs: registers, exits, sysregs
Part IVDevices: MMIO, PL011, DTB
Part VInterrupts and time
Part VIBooting Linux
Part VIIVirtio
Part VIIISMP
Part IXFirmware and FreeBSD
Part XmacOS guests
Honesty note. The macOS-guest chapters are research chapters: they state what was and was not observed on a real Mac, and nothing more. Chapters marked "planned" are not written yet.