Phase 4 of 4 · Study weeks 13-16
Build, verification, interop and shipping
This phase makes the last checkpoint possible: a library you can build anywhere, fuzz, load from another language and debug after a crash.
Topics every week
- Week 138 h
- CMake presets and targets
- Dependencies with vcpkg or Conan
- Reproducible builds
- Hardening flags
Hand inA preset build with two compilers and a dependency lock
- Week 148 h
- Fuzzing with libFuzzer
- Property tests
- Coverage that finds gaps
- Triage of a crash
Hand inA fuzz target for the parser and a seeded crash found within 60 s
- Week 158 h
- A stable C ABI
- Bindings for Python with nanobind
- ABI checks in CI
- SBOMs and signed builds
Hand inA C header, a Python binding and an ABI check that fails on a struct change
- Week 168 h
- Crash reports and symbols
- Core dumps
- C++26 status and a feature-gate policy
- The upgrade and safe-language memo
Hand inCheckpoint 4, the runbook and the policy memo
Practice projects
- Practice 1, the fuzz target (Week 14): fuzz the parser for 10 minutes. Done when: no crash is found, or each one found has a regression test, and a seeded crash is found within 60 s.
- Practice 2, the ABI break (Week 15): change a public struct. Done when: the ABI check fails in CI, and you can say what an unchanged ABI guarantees and what it does not.
- Practice 3, the crash report (Week 16): crash the library on purpose. Done when: a report names the function and line from a stripped binary and a symbol file.
- Optional, a Rust consumer: call the C API from Rust. Done when: a test passes and the ownership rules of each pointer are written down.
GitHub repos to study
Existence and last commit were checked on 22 Nov 2026 by shallow clone. Every repository below had a commit in the last six months.
| Repo | What to read | Week |
|---|---|---|
| google/oss-fuzz | How projects write fuzz targets and set them up in CI | 14 |
| wjakob/nanobind | A small binding layer and its ownership rules | 15 |
| rr-debugger/rr | Record and replay for a bug that appears once in a hundred runs | 16 |
| include-what-you-use/include-what-you-use | How include hygiene affects build time | 13 |
Milestone checkpoint
Run Checkpoint 4. Build with both compilers from a clean checkout, run the fuzz target and the ABI check, add the hardening flags and the SBOM, and produce the crash report. Hand in the CI output, the fuzz log, the ABI check, ADR-6 (what the C API promises) and ADR-7 (how you gate C++26 features).
Check yourself
Answer each question in your head first, then open it to check.
Why expose a C API from a C++ library?
C has a stable layout and no name mangling, so many languages and compilers can call it. C++ classes and templates depend on the compiler and library version.What can a fuzzer find that unit tests miss?
Inputs nobody thought of: malformed lengths, odd encodings and deep nesting. It runs millions of cases and keeps the ones that reach new code.What does an ABI check catch, and what does it not?
A changed layout, size or symbol across versions. It does not catch changed behaviour behind the same signature.Why are symbols needed to read a crash from a release build?
A release build strips names and inlines code. The symbol file maps addresses back to functions and lines.Why gate C++26 features instead of using them directly?
The standard is not final and compilers differ. A gate lets you test early and turn a feature off in one place if it changes.