|new 2.0.1||Nov 19, 2020|
|2.0.0||Oct 22, 2020|
|1.0.1||Jun 15, 2020|
|1.0.0||Jun 3, 2020|
#180 in Parser implementations
139 downloads per month
Used in 2 crates
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!