Our great sponsors
-
tokio
A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I must admit that I have been noticing this as projects become larger (and hence more complex dependency graphs). The dependencies usually look plentiful, but fortunately, the most popular crates only pull in the bare minimum. In most cases, they depend on "micro-crates" or "sub-crates (of the same workspace)", which is what gives the illusion of "too many crates". A good example of a well-structured project is Tokio, where most dependencies are optional and barred behind additive compilation features.
This was exactly what I did to shave a full minute off CI build times (from 3 minutes to 2 minutes) in one of the projects I depended on. However, rather than just removing default-features, I replaced the futures crate entirely with its significantly lightweight sub-crate futures-core when I realized that the project only ever used futures for the Stream trait.
As for overall compilation performance, try switching to LLD or mold for your linker. (Note that mold is only faster than LLD if you have enough CPU cores. Its advantage is parallelizing better.)
Check whackadep and cargo-dephell: https://github.com/mimoo/cargo-dephell and https://github.com/diem/whackadep
Check whackadep and cargo-dephell: https://github.com/mimoo/cargo-dephell and https://github.com/diem/whackadep
Maybe an extension to cargo-udeps?