| Crates.io | gem_version |
| lib.rs | gem_version |
| version | 0.3.1 |
| created_at | 2024-07-19 17:02:51.327823+00 |
| updated_at | 2024-07-24 20:53:24.26487+00 |
| description | Ruby's Gem::Version comparison logic in Rust |
| homepage | |
| repository | https://github.com/schneems/gem_version |
| max_upload_size | |
| id | 1308890 |
| size | 12,060 |
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.
Add it to your cargo.toml:
$ cargo add gem_version
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());