Closed sdroege closed 1 year ago
Which syntax should we use for this? The cargo or pkg-config one?
Maybe something that you can parse directly into a range, so maybe just the Rust syntax? 0.1.0..=0.9.0
(for >=0.1.0, <= 0.9.0), 0.1.0..0.9.0
(for >= 0.1.0, << 0.9.0)
Wouldn't it make more sense to use the cargo syntax has it's in the same file? https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html And there may already have parsing code for those.
Sure if you want to parse those to exact / at least / range
You could use https://docs.rs/semver/latest/semver/ and then convert the result of that to one of the cases pkg-config understands. Converting the VersionReq
vec of comparators seems like a bit of work though.
I'm working on this now
This needs calling https://docs.rs/pkg-config/latest/pkg_config/struct.Config.html#method.range_version and some syntax for specifying this in
Cargo.toml
.