gem_version

Crates.iogem_version
lib.rsgem_version
version0.3.1
sourcesrc
created_at2024-07-19 17:02:51.327823
updated_at2024-07-24 20:53:24.26487
descriptionRuby's Gem::Version comparison logic in Rust
homepage
repositoryhttps://github.com/schneems/gem_version
max_upload_size
id1308890
size12,060
Richard Schneeman (schneems)

documentation

https://docs.rs/gem_version

README

Gem version

What

Implement Ruby's Gem::Version comparison logic in Rust:

The main use case is for the Heroku Ruby buildpack https://github.com/heroku/buildpacks-ruby and associated ecosystem of managing Ruby logic inside of Rust.

Install

Add it to your cargo.toml:

$ cargo add gem_version

Use

use std::str::FromStr;
use gem_version::GemVersion;

let version = GemVersion::from_str("1.0.0").unwrap();
assert!(version < GemVersion::from_str("2.0.0").unwrap());
Commit count: 0

cargo fmt