Skip to content

Course map

Published lessons are always open. Planned deep dives are built one complete scenario-backed lesson at a time.

Reconstruction

Rebuild Ghostty from a single process, moving the dependency frontier only when the previous version reaches a limitation.

00
Chapter 00: A process existsBuild one Zig executable, understand every line, and produce the first visible output before introducing any terminal-emulator machinery.
Available
01
Chapter 01: App owns the lifetimeMove process-wide ownership out of main, allocate one stable App pointer, and make initialization and cleanup order visible.
Available
02
Chapter 02: Read the RouterRead every Zig file in the Chapter 02 checkpoint and follow how the executable reaches App startup.
Available
03
Chapter 03: Runtime and SurfaceMove the event-loop lifetime out of shared App state and introduce one headless runtime Surface around one core Surface.
Available
04
Chapter 04: Pipes are not a terminalLaunch a real child process from Surface, capture its output, and measure the terminal semantics ordinary pipes do not provide.
Available
05
Chapter 05: A real PTYReplace pipe-only child streams with a Linux pseudoterminal, controlling session, foreground process group, and fixed terminal window.
Available
06
Chapter 06: Termio owns PTY bytesReplace finite PTY collection with one owner for the live child, incremental reads, writes, exit, and teardown.
Available
07
Chapter 07: Incremental VT parserPreserve parser state across arbitrary PTY chunks and emit printable, C0 control, and SGR actions.
Available
08
Chapter 08: Terminal state and debug frameApply parser actions to styled cells and cursor state, then render a deterministic textual frame.
Available
09
Chapter 09: First native GTK windowSelect an opt-in GTK4 runtime, present a real 900×600 native window, run its event loop, and capture genuine visual evidence.
Available
10
Chapter 10: First OpenGL rectangleGive runtime Surface a GtkGLArea, verify an OpenGL 4.3+ context, and draw one regionally verified rectangle.
Available
11
Chapter 11: Fonts, input, and production architectureAdd the first glyph, keyboard input, resize, and progressively introduce threads and mailboxes.
Planned

Field guides

Complete integration stories for ls, Codex, tmux, and SSH. Useful references, but no longer the primary sequence.