Rust builds up to twice as fast by emitting metadata early
Emitting metadata early makes building/checking Rust up to twice as fast
Headstart patches rustc and cargo to write early metadata as soon as a crate's interface is checked, letting dependents start compiling before dependencies finish type-checking. On 16 cores, clean builds of 13 real projects are up to 54% faster for cargo check and 42% for cargo build, with no slowdowns. Errors still surface with identical diagnostics and exit status.
Headstart makes rustc write an early metadata file as soon as the interface is checked, and makes cargo start dependents on it.