pub const BUILDER_STAGES: [&str; 6];Expand description
The stages of the builder, in order, before the runtime stage. Each is a layer cache boundary, and what invalidates each is the point of the split:
toolchain: the pinned Rust image, the C library headers and sccache, which every latercargoruns behind (seeSCCACHE_DIR); only a toolchain pin moves it.recipe: the package’s manifest and lockfile with the package’s own version masked and its bench, test and example targets dropped. Its output, not the files it reads, is what the next stage copies, so a release that bumps only the version reaches the same recipe and does not recompile a dependency.deps: every dependency downloaded and compiled against stub sources, in the profile, features and target of the real build. It is ordinary layer content — unlike a--mount=type=cachedirectory, which a registry cache export never carries — so a fresh runner that imports the cache gets the compiled dependencies too.build: the real sources over the compiled dependencies; only the package itself compiles. The commit arguments live here and nowhere earlier, so a new commit never reaches a dependency.release: a release’s own published executable, taken from therelease-binarybuild context (RELEASE_CONTEXT) instead of compiled; seeBINARY_ARG.binary: whichever ofbuildandreleaseBINARY_ARGnames — the one stage the runtime takes its executable from, so the runtime is the same whatever made the binary.