Skip to main content

Build Your Own X: Systems

This phase is where Build Your Own X shines: most of the legendary tutorials in the BYO-X catalog live here — compilers, interpreters, OSes, shells, Git, Docker, TCP stacks. The systems phase already pushes you toward bare-metal, so the elective projects deepen the same muscles.

Each project here is a self-contained tutorial: research links, the curated BYO-X external tutorial list preserved verbatim, recommended primary path, implementation milestones with code sketches, evidence requirements, common pitfalls, and module integration notes.

The quality bar is higher than "finished the tutorial." A completed systems project must include a written contract for the machine, language, protocol, file format, or syscall boundary it implements; a test suite that covers failure cases; at least one trace from the running system; and a short design note explaining where the implementation is deliberately incomplete.

Use source guides responsibly

The BYO-X repository is a curated catalog of external tutorials. Read them when needed, then write your own code, your own explanation, and your own tests. Do not paste external tutorials into your portfolio.


Projects in this phase

ProjectPrimary module fitDifficultyLanguages typically used
Memory AllocatorSem 4 M2 — memory & pointersMediumC
ShellSem 4 M4 — systems-level programmingMediumC, Rust, Go
Interpreter (Tree-Walking)Sem 4 M5 — abstraction & interpretationMediumAny
CompilerSem 4 M5 — abstraction & interpretationHardJava, C, Go, OCaml
Text Editor (kilo-style)Sem 4 M1 — C fundamentalsEasy–MediumC, Rust
GitSem 4 M1 / Sem 5 storageMediumPython, Ruby, Haskell
Emulator (CHIP-8 / GB)Sem 4 M3 — computer organizationMedium–HardC, C++, Rust
Operating SystemSem 5 M1–M2 — OS, memoryHardRust, C, Assembly
Network Stack (TCP)Sem 5 M5 — networkingHardC, Rust
Docker / Container RuntimeSem 5 M3–M4 — concurrency, FSMediumGo, Python, C
BitTorrent ClientSem 5 M5 — networkingMediumGo, Python, Node.js
Regex EngineSem 4 M5 — abstraction & interpretationMediumPython, Go, C

Additional local book-backed projects:

ProjectPrimary module fitDifficultyLanguages typically used
Toy ComputerSem 4 M3 - computer organizationMediumPython, C, Rust
Source Code to Machine CodeSem 4 M3/M5 - compiler/codegenHardPython, C, Assembly
MLIR Compiler PipelineSem 4 M5 - advanced compiler infrastructureHardC++, Python

Cross-phase projects (covered in other phases):


Systems module → project map

Semester 04: Systems Programming

ModuleRecommended BYO projectsWhy it fits
Module 1 — C programming fundamentalsText Editor (kilo), ShellBoth are classic "write a small but complete program in C" exercises with realistic edge cases
Module 2 — Memory, pointers, machine representationMemory AllocatorForces direct engagement with ownership, fragmentation, alignment
Module 3 — Computer organization & architectureToy Computer, Emulator, Source Code to Machine CodeToy Computer defines a machine, Emulator implements a real one, Source-to-Machine-Code proves how programs target one
Module 4 — Systems-level programmingShell, Docker (light version)fork/exec/pipe/dup2 and namespaces
Module 5 — Abstraction & interpretationInterpreter, Compiler, Source Code to Machine Code, Regex Engine, MLIR Compiler PipelineStart with syntax and evaluation, then move through bytecode, native code, automata, and modern multi-level IR

Semester 05: OS and Networking

ModuleRecommended BYO projectsWhy it fits
Module 1 — Processes & schedulingOperating System (Phil Opp's blog_os covers scheduling around chapter 7+)Real schedulers, not simulators
Module 2 — Memory management & virtual memoryOperating System (paging chapters)Page tables, frame allocator, heap
Module 3 — Concurrency & synchronizationDocker / Container, BitTorrent ClientBoth require correct concurrent I/O
Module 4 — File systems & I/OGit, DockerGit is a content-addressable filesystem on top of a normal filesystem
Module 5 — Network protocols & socketsNetwork Stack (TCP), BitTorrent ClientTCP from scratch, then a real peer-to-peer protocol

Local source additions

The local Build Your Own source set adds three systems projects beyond the original BYO-X catalog shape. These source IDs refer to local material under the workspace/library source set, not to committed generated reference pages:

  • Toy Computer, source ID build-your-own/toy-computer, belongs before or beside the emulator project.
  • Source Code to Machine Code, source IDs build-your-own/source-to-machine-code-james-smith and build-your-own/c-compiler-nora-sandler, is the native-code path after the compiler project.
  • MLIR Compiler Pipeline, source ID build-your-own/mlir-oren-davis, is the advanced compiler-infrastructure path after the basic compiler.

Use them when the learner wants deeper computer-architecture or compiler evidence than the standard interpreter/compiler pages provide.


Project quality rubric

DimensionMinimum acceptable evidenceStrong evidence
Specificationone-page language, ISA, protocol, or ABI contractversioned spec with examples and rejected cases
Testshappy path plus malformed inputgolden tests, randomized/model tests, and regression fixtures
Observabilityone trace, dump, or log from the running systemtrace mode that explains every state transition
Correctness oraclemanual expected outputinterpreter/reference model/differential test where possible
Performanceone measurement after completionrepeatable benchmark with p50/p95 and a written caveat
PortfolioREADME and demo commanddesign note, limitations, test transcript, and reproducible build

This is the main improvement over dumping book material into the plan: each book-backed project now has to produce inspectable engineering evidence.


Build rules (stricter for systems)

  1. Tiny working systems beat large unfinished rewrites. A 200-line interpreter you can extend beats a 2,000-line "almost-compiler" you cannot.
  2. Source + tests + traces + notes live in the same repo.
  3. Every module build must include one failure case. A working demo is half the evidence.
  4. Every system call, memory boundary, or protocol assumption needs proof. strace, sanitizer logs, packet captures, or a written invariant.
  5. Reproducibility matters. A reviewer must be able to build and run your project on a clean machine from your README.

Source