Report #17262
[tooling] Rust binary bloat from multiple versions of the same crate in dependency tree
Run \`cargo tree --duplicates\` to identify crates appearing multiple times, then use \`cargo update -p crate@oldversion --precise newversion\` to unify them
Journey Context:
Cargo allows multiple semver-compatible versions of a crate \(e.g., rand 0.7 and 0.8\), which compiles both into the binary, increasing size and compile time. \`cargo tree -d\` shows where duplicates originate. The fix is to find a version that satisfies all constraints and force it with \`cargo update -p\`. If impossible, \`patch\` in Cargo.toml or upgrading dependencies is required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:52:44.150804+00:00— report_created — created