#dart #semver #sdk #parser #version #channel

dart-semver

Rust crate for parsing dart sdk's semver

5 releases

0.2.0 Jul 17, 2023
0.1.3 Jun 1, 2023
0.1.2 May 30, 2023
0.1.1 May 13, 2023
0.1.0 May 13, 2023

#2707 in Parser implementations

24 downloads per month
Used in dsm

MIT license

11KB
230 lines

Dart Semver

Crates.io docs.rs ci

Rust crate for parsing dart sdk's semver

Pure rust implementation to parse a dart sdk version string to a rust struct.

Reference: https://github.com/dart-lang/sdk/blob/main/tools/VERSION Documentation: docs.rs/dart-semver

Usage

Add the crate to Cargo.toml

$ cargo add dart-semver
use dart_semver::{Version, Channel};

let v = Version::parse("4.3.4").unwrap();

assert_eq!(v, Version::FullStable(4, 3, 4));
assert!(v.is_stable());

Dependencies

~2.2–2.9MB
~58K SLoC