versions
A library for parsing and comparing software version numbers.
7.0.0
11M downloads/mo
#3018 most downloaded on crates.io
fosskers/rs-versions
What this package is like to depend on
Last release 1 years ago
no release in 18 months
Release timing varies
gaps range from 5 weeks to 13 months
Nearly every release is documented
notes for 21 of 21 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
22 releases · first in 2020
0 releases in the last 12 months
see the full history below
Release timeline
22 releases · Jun 2020 to Feb 2025Releases
latest 22-
7.0.024 Feb 2025Release notes
Open source →Changed
- Support for Rust 2024 and other dependency bumps,
nomin particular.
Release notes
Open source →Changed
- Support for Rust 2024 and other dependency bumps,
nomin particular.
- Support for Rust 2024 and other dependency bumps,
-
6.4.024 Feb 2025 withdrawnNothing published for this version
-
6.3.209 Aug 2024 -
6.3.104 Aug 2024Release notes
Open source →Fixed
- Parsing of
Messon a single digit will correctly yieldMChunk::Digits. - Improved comparison of
Versions whose main chunks lead with a letter, e.g.r23.
Release notes
Open source →Fixed
- Parsing of
Messon a single digit will correctly yieldMChunk::Digits. - Improved comparison of
Versions whose main chunks lead with a letter, e.g.r23.
- Parsing of
-
6.3.015 Jun 2024 -
6.2.018 Mar 2024Release notes
Open source →Added
Requirement::serializefor pretty-encoding of version "requirements strings".
Release notes
Open source →Added
Requirement::serializefor pretty-encoding of version "requirements strings".
-
6.1.012 Jan 2024Release notes
Open source →Added
- The
Requirementtype for testing version constraints. Versioning::parsefor usage withnom.Versioning::deserialize_prettyfor deserializing directly from raw version strings.
Release notes
Open source →Added
- The
Requirementtype for testing version constraints. Versioning::parsefor usage withnom.Versioning::deserialize_prettyfor deserializing directly from raw version strings.
- The
-
6.0.006 Dec 2023Release notes
Open source →While technically a breaking change, most users should not notice.
Changed
- The
Err/Errorassociated types for automatic conversion of strings into proper version types have been changed from()to a properErrorenum.
Release notes
Open source →While technically a breaking change, most users should not notice.
Changed
- The
Err/Errorassociated types for automatic conversion of strings into proper version types have been changed from()to a properErrorenum.
- The
-
5.0.113 Aug 2023 -
5.0.009 May 2023Release notes
Open source →This introduces a very small, technically breaking change to the API involving a single type. If you're just doing basic parsing and comparisons and not actually inspecting the types themselves, you shouldn't notice a difference.
Changed
- Versions with
~in their metadata will now parse as aMess. Example:12.0.0-3ubuntu1~20.04.5
Release notes
Open source →This introduces a very small, technically breaking change to the API involving a single type. If you're just doing basic parsing and comparisons and not actually inspecting the types themselves, you shouldn't notice a difference.
Changed
- Versions with
~in their metadata will now parse as aMess. Example:12.0.0-3ubuntu1~20.04.5
- Versions with
-
4.1.021 Apr 2022 -
4.0.008 Jan 2022Release notes
Open source →Added
- The
Releasetype.
Changed
SemVerandVersionhave had their prerel field changed toRelease.- The
Chunktype has changed from a struct to an enum.
Removed
- The
Unittype.
Fixed
- A bug involving zeroes in
SemVerprereleases. - A bug involving the
Displayinstance forVersion.
Release notes
Open source →Added
- The
Releasetype.
Changed
SemVerandVersionhave had their prerel field changed toRelease.- The
Chunktype has changed from a struct to an enum.
Removed
- The
Unittype.
Fixed
- A bug involving zeroes in
SemVerprereleases. - A bug involving the
Displayinstance forVersion.
- The
-
3.0.323 Aug 2021 -
3.0.228 May 2021Release notes
Open source →Added
- A proper LICENSE file.
Changed
- The
Hashinstance ofSemVeris now hand-written to uphold the Law that:
k1 == k2 -> hash(k1) == hash(k2) -
3.0.110 May 2021 -
3.0.016 Apr 2021Release notes
Open source →This release brings
versionsin line with version2.0.0of the SemVer spec. The main addition to the spec is the allowance of hyphens in both the prerelease and metadata sections. As such, certain versions like 1.2.3+1-1 which previously would not parse as SemVer now do.To accomodate this and other small spec updates, the
SemVerandVersiontypes have received breaking changes here.Added
Serdesupport through the optionalserdefeature.Versioning::nthto pick out certain fields of a generically parsed version.Defaultis now derived onVersioning,SemVer,Version,MessandChunksso that it's possible to initialize as a struct's field.
Changed
- Breaking:
SemVer::metaandVersion::metano longer parse asChunksbut as vanillaStrings. - Breaking: As a semantic change,
Versions now expect metadata to come after any prerelease, just as withSemVer.Versionis now thus fairly similar toSemVer, except that is allows letters in more permissive positions.
Fixed
- Two small bugs involving
SemVer/Versioncomparisons.
-
2.1.022 Mar 2021Release notes
Open source →Added
SemVer::parse,Version::parse, andMess::parsehave been madepubso that these parsers can be integrated into other generalnomparsers.
-
2.0.223 Jan 2021 -
2.0.119 Nov 2020Release notes
Open source →Changed
- Updated to
nom-6.0. - Utilize new type linking in docstrings, thanks to the latest stable Rust.
- Updated to
-
2.0.022 Oct 2020Release notes
Open source →Changed
- Breaking:
Mess::chunkrenamed toMess::chunksto matchVersion. - Breaking:
Messnow stores smarterVec<MChunk>instead ofStrings. SemVer::to_versionis no longer a lossy conversion, due to the new field inVersion(see below).- Most
Displayinstances are more efficient.
Added
- Breaking: The
meta: Option<Chunks>field forVersion. - The
MChunktype which allowsMessto do smarter comparisons.
Fixed
- A number of comparison edge cases.
- Breaking:
-
1.0.115 Jun 2020 -
1.0.003 Jun 2020Release notes
Open source →This is the initial release of the library.
Added
- All types, parsers, and tests.