News for hackers. Stuff that matters.
Re:Understanding Rust futures by going way too deep by fasterthanlime on Monday July 26, 2021 @06:49AM (#27957909)
Compile/link times are definitely a discussion topic. Here's some quick tips:

  * Incremental compilation helps locally, not so much in CI, unless you save/restore the whole cache which gets large quickly and evicting the out-of-date objects is non-trivial.
  * In CI, sccache helps, but not as much as I'd like: there's a bunch of things that are non-cacheable, notably crates that pull in & compile C/C++ code (I'd trade 2 c-bindings crates against 12 Rust-only crates any day for that reason alone)
  * Splitting stuff across different crates helps parallelizing the build (and caching it better), which may be one of the reasons some projects end up having "1000 dependencies" (although I've rarely seen upwards of 600)
  * For incremental builds, linking does become the bottleneck. Full LTO is especially slow, Thin LTO is better. Switching to LLD improves thing. I'm hopeful that mold will improve things some more.
  * Re multiple PRs: thankfully crate families tend to live in the same repository, so fixing something across both tracing / tracing-subscriber could be a single PR, for example.
I wish the Rust community invested more in build caching, but even with the current state of things, there's often steps you can take to make things better.
Re:Understanding Rust futures by going way too deep by snovv_crash on Tuesday July 27, 2021 @04:24AM (#27969963)
Can you combine ccache with a sccache to make the C/C++ parts fast too?
Re:Understanding Rust futures by going way too deep by styluss on Monday July 26, 2021 @10:59AM (#27960213)
Have you tried sccache? https://github.com/mozilla/sccache
Re:Understanding Rust futures by going way too deep by riquito on Monday July 26, 2021 @11:25AM (#27960588)
It's his second bullet point