Cargo version requirement checker

Paste a dependency requirement from Cargo.toml and a list of crate versions. See the range it really means, which versions match, and what cargo update would pick.

Runs entirely in your browser. Your data is never uploaded.

A requirement like 1.2, ^0.3 or ">=1.2, <1.5". You can paste the Cargo.toml line, e.g. serde = { version = "1.0", features = ["derive"] }.

Try:

One per line (commas and spaces also work). Paste a release list to see what would be selected.

What each requirement means

These rows are checked by the same code that powers the tool above.

RequirementEquivalent rangeMatchesDoes not match
1.2.3>=1.2.3, <2.0.01.2.3, 1.9.02.0.0, 1.2.2
^1.2>=1.2.0, <2.0.01.2.0, 1.99.02.0.0
^0.2.3>=0.2.3, <0.3.00.2.3, 0.2.90.3.0
^0.0.3>=0.0.3, <0.0.40.0.30.0.4
~1.2.3>=1.2.3, <1.3.01.2.91.3.0
~1>=1.0.0, <2.0.01.5.02.0.0
1.2.*>=1.2.0, <1.3.01.2.71.3.0
=1.2.3=1.2.3 (exactly)1.2.31.2.4
>=1.2, <1.5>=1.2.0, <1.5.01.4.91.5.0

A bare version is not a pin

In Cargo, serde = "1.0.130" means ^1.0.130: any 1.x release at or above 1.0.130. To pin an exact version, write "=1.0.130". npm does the opposite: there, a bare version is exact.

Why 0.x versions behave differently

Cargo treats the first non-zero number as the "major" version. ^0.3 therefore stops before 0.4.0, and ^0.0.3 allows only 0.0.3. Before 1.0, a minor release is assumed to contain breaking changes.

Pre-releases

A pre-release like 1.3.0-beta.1 only matches if one of the comparators names the same 1.3.0 with a pre-release tag. That's why ^1.2 and even >=1.0.0 never pick 1.3.0-beta.1, while >=1.3.0-beta.1 does.

Coming from other ecosystems

About this checker

The engine is a TypeScript port of the semver crate 1.0.28, which is what Cargo uses. It is tested against the crate's own output for 55 requirements × 39 versions, including its exact error messages. Everything runs in your browser.