loose-semver

Crates.ioloose-semver
lib.rsloose-semver
version1.1.0
created_at2025-05-01 14:38:00.294816+00
updated_at2025-05-03 18:49:37.788276+00
descriptionLoose parser for Semantic Versioning
homepage
repositoryhttps://github.com/zekrotja/loose-semver
max_upload_size
id1656343
size23,469
Ringo Hoffmann (zekroTJA)

documentation

https://docs.rs/loose-semver

README

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);
}
Commit count: 6

cargo fmt