It might be interesting to research how to make rust friendlier for distributed compiles. I was working with the venders of a distributed compilation tool on this and they commented that it was looking like rustc was inherently unfriendly for distribution compared to C++.

There are a couple of reasons for this.

First it is hard to discover the minimal set of .rs files (and potentially others via include_str!) that will be needed by any given compile (and thus sent to remote workers).

Second, unlike C++ which can distribute compiles of several individual files to hundreds of workers and then link them all together on the host machine, rust appears to invoke one copy of rustc per crate which includes linking. This puts not only the burden of sending input files to workers on the distribution tool, but also the burden of discovering and transmitting all input files needed by the linker itself, which is a completely unnecessary for distributed C++ compiles.

Because of this rather than amortizing away the cost of compiling individual source files, rust can only amortize away the cost of compiling individual crates. In a small project, this might be <50 crates so the benefits are hard to realize…

Distribution makes C++'s compile times a solved problem for my company, so it would be awesome if the Rust toolchain could become friendlier for this solution.