12 stable releases (3 major)
|4.1.0||Apr 21, 2022|
|4.0.0||Jan 8, 2022|
|3.0.3||Aug 23, 2021|
|3.0.2||May 28, 2021|
|1.0.1||Jun 15, 2020|
#110 in Parser implementations
14,305 downloads per month
Used in 15 crates (10 directly)
A library for parsing and comparing software version numbers.
We like to give version numbers to our software in a myriad of different ways. Some ways follow strict guidelines for incrementing and comparison. Some follow conventional wisdom and are generally self-consistent. Some are just plain asinine. This library provides a means of parsing and comparing any style of versioning, be it a nice Semantic Version like this:
...or a monstrosity like this:
For the Haskell version of this library, see here.
use versions::Versioning; let good = Versioning::new("1.6.0").unwrap(); let evil = Versioning::new("1.6.0a+2014+m872b87e73dfb-1").unwrap(); assert!(good.is_ideal()); // It parsed as a `SemVer`. assert!(evil.is_complex()); // It parsed as a `Mess`. assert!(good > evil); // We can compare them anyway!
You can enable
Serde support for serialization and
deserialization with the