Skip to main content Module rustc Copy item path Source use cargo_util::collections::HashMap; π use std::env ; π use std::env ; π use std::hash::Hash ; π use std::hash::Hash ; π use std::hash::Hasher ; π use std::path::Path ; π use std::path::PathBuf ; π use std::sync::Mutex ; π use anyhow::Context as _; π use cargo_util::ProcessBuilder ; π use cargo_util::ProcessError ; π use cargo_util::paths ; π use filetime::FileTime; π use serde::Deserialize ; π use serde::Deserialize ; π use serde::Serialize ; π use serde::Serialize ; π use tracing::debug; π use tracing::info; π use tracing::warn; π use crate::compiler::apply_env_config ; π use crate::util::interning::InternedString ; π use crate::util::CargoResult ; π use crate::util::GlobalContext ; π use crate::util::StableHasher ; π Cache π It is a well known fact that rustc is not the fastest compiler in the
world. What is less known is that even rustc --version --verbose takes
about a hundred milliseconds! Because we need compiler version info even
for no-op builds, we cache it here, based on compilerβs mtime and rustupβs
current toolchain. CacheData π Output π Rustc Information on the rustc executable process_fingerprint π rustc_fingerprint π