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 metadatavia thecargo_metadatacrate. - 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
prefetchmodule. - rendering: Rendering the data via the
build.nix.teratemplate, seerendermodule.