Project Overview & Terminology
If you want to hack on this, it is useful to know that build file generation is broken up into multiple phases:
- cargo metadata: Calling
cargo metadata
via thecargo_metadata
crate. - indexing metadata: Indexing the metadata by package ID to enable easy joining of “Node” and “Package”
information, resulting in
metadata::IndexedMetadata
. - resolving: Using the indexed metadata to actually resolve the dependencies and join all needed build information
into
resolve::CrateDerivation
. - pre-fetching: Pre-fetching crates.io packages to determine their sha256, see
prefetch
module. - rendering: Rendering the data via the
build.nix.tera
template, seerender
module.