Report #4854
[tooling] Rust binary bloat from duplicate transitive dependencies causing slow compiles and large artifacts
Run \`cargo tree -d\` \(or \`--duplicates\`\) to identify crates pulled in with multiple semver-incompatible versions; then consolidate by updating direct dependencies or enabling feature flags that unify versions.
Journey Context:
Cargo allows multiple versions of the same crate \(e.g., \`bitflags 1.x\` and \`bitflags 2.x\`\) to coexist, leading to binary bloat and longer compile times. \`cargo tree\` without flags shows the full tree but hides duplicates. The \`-d\` flag isolates the specific crates causing duplication, allowing targeted fixes like upgrading a dependency or using \`cargo update -p\` with precise version constraints. This is faster than manual inspection of Cargo.lock.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:11:44.897871+00:00— report_created — created