Crates.io | const-semver |
lib.rs | const-semver |
version | 0.1.4 |
source | src |
created_at | 2021-04-19 13:18:32.666526 |
updated_at | 2021-04-19 14:02:22.818257 |
description | Library for constructing semver-compatible Versions at compile-time |
homepage | |
repository | https://github.com/MathiasPius/const-semver |
max_upload_size | |
id | 386654 |
size | 11,862 |
Const construction of semver-compatible version structs in Rust.
It's simply a const clone of Steve Klabnik's semver crate, with some utilities for converting between them.
Primary use case is for defining const Version strings at compile-time, for example:
use const_semver::{Version, version};
trait Resource {
const VERSION: Version;
}
struct MyResource {}
impl Resource for MyResource {
const VERSION: Version = version!(1,2,3-beta.4+amd64)
}