Build Systems

Turning source into an artifact you can trust: reproducibility, pinned inputs, environment isolation, and being able to prove where a binary came from.

What a Build System Actually Is

A dependency graph of tasks with declared inputs and outputs, plus a rule for deciding what still needs doing — not a script that runs commands in order.

Q · What is a build system doing that a shell script does not?
Reproducible Builds

The same source plus the same declared inputs yields the same artefact — which requires pinned dependencies, deterministic actions and an isolated environment, in that order.

Q · If I build this commit again next month on another machine, do I get the same artefact — and how would I know?
Build Provenance

Six facts recorded at build time — commit, builder, inputs, toolchain, timestamp and artefact digest — that let you answer "where did this artefact come from" without guessing.

Q · Something is running in production. Can we prove which commit it was built from, by what, and from which dependencies?
Dependency Management

Most of what you ship was written by strangers, resolved by an algorithm you did not choose, and updated on a schedule you have to decide.

Q · What is actually in this build, who decided which versions, and how does that set change over time?
Dependency Pinning

Pinning buys reproducibility and tamper-evidence, and hands you the update duty the range was performing on your behalf.

Q · Should dependencies be pinned to exact versions, and what do you take on when you do?
Build Environments

The machine a build runs on is an input to the build, and everything about it that is not declared is a source of drift, of irreproducibility and of shared-state compromise.

Q · What about the machine running this build is an input, and which of those inputs have we actually declared?
Build Performance

Builds are slow for three different reasons — repeated work, serialised work, and genuinely expensive work — and each has a fix that does nothing for the other two.

Q · The build is slow. Which of the three slownesses is it, and what actually helps?