const-semver

Crates.ioconst-semver
lib.rsconst-semver
version0.1.4
sourcesrc
created_at2021-04-19 13:18:32.666526
updated_at2021-04-19 14:02:22.818257
descriptionLibrary for constructing semver-compatible Versions at compile-time
homepage
repositoryhttps://github.com/MathiasPius/const-semver
max_upload_size
id386654
size11,862
Mathias Pius (MathiasPius)

documentation

README

const-semver

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)
}
Commit count: 0

cargo fmt