Rust 2019: Think Bigger

Note also this thread: [Idea] Cargo Global Binary Cache

I think it’ll get us 70% of shared crates.io cache with a small amount of implementation & design work.

Fun observation: there’s a desire to add “rlib dependencies” feature to Cargo, to integrate with other build systems and such. This is a huge design space. However, just sharing target dir for all crates.io work will get us shared cache aspect of rlib dependencies, and is very simple because the layout of target dir is controlled by Cargo and is an implementation detail. Basically, we need to tweak a couple of lines in Cargo to say "if this dep comes from crates.io, compile it to ~/.cargo/target" and not to ./target.

1 Like