A rustc self-profile records compiler activities and query events. First isolate the slow crate, then compare self time, invocation count, cache behaviour, and code generation under controlled builds.
Rust's incremental cache is a dependency graph, not a saved compiler process. Learn what an edit dirties, how green nodes are recovered, and why Cargo may still run rustc.