Expand description
What this release pins: one sysroot artifact per target, by URL and by hash.
Design: spec/cross-compile/13-distribution.md section 13.2, which says every downloaded
artifact has a hash pinned in the rucc release, checked before use, with a mismatch being a hard
failure and no flag to get past it. Section 13.8 divides the work in three and the other two are
written: rucc_driver::fetch moves the bytes with a program the machine already has, and
rucc_driver::install decides whether what arrived is the right tree. This is the third, which
is the statement of what the right one is, and it is the half that makes the other two mean
anything.
§Why it is here rather than with the two halves that use it
Because it is read by something that cannot depend on the driver. The distribution manifest of
section 13.5 is generated by a build tool, the same way docs/TARGETS.md and tests/link-lines
are, and what it says about a target is what this table says plus what crate::Wall says. A
build tool that pulled in the whole driver to read three strings would be a layer violation
dressed up as convenience. It sits well here for a second reason as well: a pin is a fact about
a sysroot, which is what this crate is for, and the fetch and the install are what a driver does
with one.
§Why the table is in the binary
Because a hash that travels with the artifact is not a pin, and a hash in a file beside the compiler is a hash whoever replaces the artifact can replace too. The release is the authority for what an artifact of that release is, so the table is compiled into the release, which also means an upgrade can change a URL without anything on the machine having to be told.
It is a table rather than a computed URL for the same reason. A name built out of a version and a tuple looks tidier and quietly says that every target’s artifact is at a predictable address forever, which is a promise about somebody else’s file server. A row per target costs three strings and says only what is true.
§Why it is empty
Because nothing has published a sysroot artifact yet. The producer is in tamnd/rucc-cross, per
document 08.7, and the table cannot honestly name a URL and a hash before there is a file at one
with the other. So PINNED has no rows today, every --fetch says so by name, and the test at
the bottom of this file is what the first row will be held to when it is added.
Structs§
- Pinned
- One artifact: the sysroot for one target, as this release pins it.
Constants§
- PINNED
- Every artifact this release pins, in tuple order.
Functions§
- pinned_
for - The artifact this release pins for
tuple, if it pins one. - pinned_
targets - Every target this release pins an artifact for, for a message that has to say what there is.