cargo::core::compiler::fingerprint

Function calculate

Source
fn calculate(
    build_runner: &mut BuildRunner<'_, '_>,
    unit: &Unit,
) -> CargoResult<Arc<Fingerprint>>
Expand description

Calculates the fingerprint for a Unit.

This fingerprint is used by Cargo to learn about when information such as:

  • A non-path package changes (changes version, changes revision, etc).
  • Any dependency changes
  • The compiler changes
  • The set of features a package is built with changes
  • The profile a target is compiled with changes (e.g., opt-level changes)
  • Any other compiler flags change that will affect the result

Information like file modification time is only calculated for path dependencies.