@fmckeogh
Not sure if it is till relevant, but at this scale you may consider building your project with Bazel, vendor all dependencies, and use Remote Build Execution (RBE) and Remote Cache on BuildBuddy to build on a cluster. BuildBuddy has a free tier and some OpenSource offering so just talk to them.
Vendoring means, you declare all deps, download the source into one folder, usually called thirdparty, pre-compile all of them, and sleep well at night. This solves a number of pesty problems:
- No more slow compile time; I guess that is what you want.
- No more build fails in case a dep cannot be donwloaded. It is rare, but still happens.
- No more subtable bugs when a dependency somehow changes and over-writes an existing version number. This hit me only once and it's pretty insane to debug and identify.
I think, Cargo alsi supports vendoring so you may try this first before before looking into Bazel.
I have "only" 70 crates, but my build time dropped significantly once I moved to Bazel thanks to parallel compilation and caching that actually works. A full build for me is release build, unit test, integration tests, cross compilation to two platforms, and packing & push multi-arch Docker images. All this with Bazel, RBE and Remote Cache is usually done around 1 to 2 minutes for incremental builds. For a full rebuild from scratch, which I just had yesterday, it takes about 8 minutes thanks to vendoring and parallel execution on the 80 cores BB cluster. I loosely remember, GH took about hour or so mostly due to build multi-arch containers, but GH is long gone...
I understand that you don't easily convert 14k crates to Bazel, but when I looked at the repo you have linked, a lot of the crates there look fairly straight forward, so you can use some clever scripts to parse Cargo.toml and generate the matching BUILD.bazel file. rules_rust for Bazel do support loding Cargo.toml with some macros, but believe me, this bogged already down on just 50 crates because macro expansion takes too long so you really want to vendor everything from the get go since Bazel works best with vendored deps.
One word about static lining in Rust, this will blow up your comp time immediately and, frankly, there is nothing you can do about other than building multiple artifacts with disjoint dependencies sub-graphs. Consider static linking as last resort option and measure your comp time carefully on a sub-set before making a decision.