2 stable releases

Uses new Rust 2024

1.1.0 May 3, 2025
1.0.0 May 1, 2025

#1321 in Data structures

Download history 1/week @ 2025-09-28 81/week @ 2025-10-05 7/week @ 2025-10-12 2/week @ 2025-10-19

70 downloads per month

MIT license

20KB
447 lines

loose-semver

[!WARNING]
This package does not provide a spec-accurate implementation of Semantic Versioning. If you are looking for something like that, please take a look at the semver or semver-rs packages.

This crate allows to parse "semantic versions" that are not formatted exactly like spec. For example, the version scheme used by Go or Minecraft is an example for this.

This crate allows to parse versions following the Sematic Version spec as well as formats like the following examples:

  • v1.2
  • 3.4.5beta1
  • 2.3-alpha.3
  • 5-rc.1.2.3

Example

use loose_semver::Version;

fn main() {
    let v: Version = "1.2.3rc4".parse().unwrap();
    dbg!(v);
}

Dependencies

~0.8–1.2MB
~22K SLoC