renovate/lib/versioning/cargo
2019-07-22 13:12:40 +02:00
..
index.ts feat(versioning): convert to typescript (#4141) 2019-07-22 13:12:40 +02:00
readme.md docs: add versioning readmes 2019-01-07 16:19:15 +01:00

Cargo versioning

Documentation and URLs

https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html

What type of versioning is used?

Cargo uses Semantic Versioning 2.0.

Are ranges supported? How?

Cargo supports ranges in a similar manner to npm, but not identical. The important differences are:

Use of commas

Multiple version requirements can also be separated with a comma, e.g. >= 1.2, < 1.5. We interpret this to mean AND.

No exact versions unless using equals =

In Cargo, 1.2.3 doesn't mean "exactly 1.2.3", it actually means >=1.2.3 <2.0.0. So this is like the equivalent of ^1.2.3 in npm.

Range Strategy support

Cargo versioning should support all range strategies - pin, replace, bump, extend.

Implementation plan/status

  • Add cargo2npm and npm2cargo functions to leverage existing npm semver logic
  • Exact version support
  • Range support