Expand description
See CompilationFiles.
Re-exportsยง
use cargo_util::collections::HashMap;๐use std::cell::OnceCell;๐use std::fmt;๐use std::hash::Hash;๐use std::hash::Hash;๐use std::hash::Hasher;๐use std::path::Path;๐use std::path::PathBuf;๐use std::sync::Arc;๐use cargo_util_schemas::core::CrateType;๐use cargo_util_schemas::manifest::TomlTrimPaths;๐use tracing::debug;๐use super::BuildContext;๐use super::BuildRunner;๐use super::CompileKind;๐use super::FileFlavor;๐use super::Layout;๐use crate::compiler::trim_paths;๐use crate::compiler::CompileMode;๐use crate::compiler::CompileTarget;๐use crate::compiler::FileType;๐use crate::compiler::Unit;๐use crate::util;๐use crate::util::CargoResult;๐use crate::util::OnceExt;๐use crate::util::StableHasher;๐use crate::workspace::Target;๐use crate::workspace::TargetKind;๐use crate::workspace::Workspace;๐use crate::workspace::features;๐
Structsยง
- Compilation
Files - Collection of information about the files emitted by the compiler, and the output directory structure.
- Metadata
Metadatatracks severalUnitHashs, includingMetadata::unit_id,Metadata::c_metadata, andMetadata::c_extra_filename.- Output
File - Info about a single file emitted by the compiler.
- Unit
Hash - Uniquely identify a
Unitunder specific circumstances, seeMetadatafor more.
Constantsยง
- METADATA_
VERSION ๐ - This is a generic version number that can be changed to make backwards-incompatible changes to any file structures in the output directory. For example, the fingerprint files or the build-script output files.
Functionsยง
- compute_
metadata ๐ - Computes the metadata hash for the given
Unit. - has_
remap_ ๐path_ prefix - HACK: Detect the potential presence of
--remap-path-prefix - hash_
metadata ๐ - Hash unique metadata per (name, source, version) triple.
- hash_
rustc_ ๐version - Hash the version of rustc being used during the build process.
- metadata_
of ๐ - Gets the metadata hash for the given
Unit. - use_
extra_ ๐filename - Returns whether or not this unit should use a hash in the filename to make it unique.
- use_
pkg_ ๐dir - Returns whether or not this unit should use a hash in the pkg_dir to make it unique.