The `dl` key in `config.json` currently allows the following substitutions:
{crate}, {version}, {prefix}, {lowerprefix}.
This change adds a {sha256-checksum} placeholder for the crate's sha256 checksum.
Allowing download by checksum makes it easier for crate files to be placed
in a content addressable store.
These new markers allow Cargo to supply a directory name (similar to
that used in crates.io-index) as part of a crate's download URL,
enabling simpler hosting of crates. Previously, a `file` URL would need
to put all crates into a single huge directory (such as `/srv/crates/`),
e.g.:
file:///srv/crates/{crate}/{crate}-{version}.crate
With the `{prefix}` marker, a more efficient directory structure may be
used, e.g.:
file:///srv/crates/{prefix}/{crate}/{crate}-{version}.crate
An example crate of `cargo-0.44.1.crate` would map to the path:
/srv/crates/ca/rg/cargo/cargo-0.44.1.crate
Cargo now support loading 'config.toml' and 'credentials.toml' in place of the same files without extension, which used to be the default. Files with extensions are easier for people to edit due to syntax highlighting, etc.
This updates some links to their new locations.
This also switches to relative-style cross-book links. This allows the links
to work better when viewing local documentation (such as through rustup),
keeps links to the same toolchain (not just stable), and allows the rust-repo
linkchecker to validate the links. The downside is that when working on the
documentation in the cargo repo, the links won't work.