cargo::core::compiler::output_depinfo

Function output_depinfo

source
pub fn output_depinfo(
    build_runner: &mut BuildRunner<'_, '_>,
    unit: &Unit,
) -> CargoResult<()>
Expand description

Save a .d dep-info file for the given unit. This is the third kind of dep-info mentioned in fingerprint module.

Argument unit is expected to be the root unit, which will be uplifted.

Cargo emits its own dep-info files in the output directory. This is only done for every “uplifted” artifact. These are intended to be used with external build systems so that they can detect if Cargo needs to be re-executed.

It includes all the entries from the rustc dep-info file, and extends it with any rerun-if-changed entries from build scripts. It also includes sources from any path dependencies. Registry dependencies are not included under the assumption that changes to them can be detected via changes to Cargo.lock.