When there are multiple ways to resolve dependencies, Cargo generally chooses the newest possible version. The goal of this post is to explain why Cargo works this way, and how that rationale relates to several recent discussions, including:
Whether we should support a “minimal version selection” option, and if so how it should relate to CI and the existing ecosystem.
Whether we should state a minimal Rust version in Cargo.toml in a way that affects dependency resolution.
The work on
vgo, a new package management tool for Go that explicitly opts for selecting the oldest possible version.