I wonder how much or Rust’s slow build times can be attributed to such dependency bloat? It would have been an interesting experiment if Cargo could force only a single “variant” of every dependency per build (it would also have been interesting to know how many builds would not have been able to “negotiate” such a constraint). Also would have opened the door to shared libraries…
cargo hakari implements automation for “the workspace hack,” a trick in Rust to ensure that, at least when you’re working in a workspace of your own crates with some common shared dependencies, those dependencies are always compiled with the same feature set to avoid duplication.
I wonder how much or Rust’s slow build times can be attributed to such dependency bloat? It would have been an interesting experiment if Cargo could force only a single “variant” of every dependency per build (it would also have been interesting to know how many builds would not have been able to “negotiate” such a constraint). Also would have opened the door to shared libraries…
cargo hakari
implements automation for “the workspace hack,” a trick in Rust to ensure that, at least when you’re working in a workspace of your own crates with some common shared dependencies, those dependencies are always compiled with the same feature set to avoid duplication.