Crates.io | current_semver |
lib.rs | current_semver |
version | 0.1.1 |
source | src |
created_at | 2023-10-02 14:59:57.738475 |
updated_at | 2023-10-02 15:03:01.360805 |
description | Get the current semver type from the environment |
homepage | |
repository | https://github.com/wyatt-herkamp/current_semver |
max_upload_size | |
id | 990037 |
size | 17,873 |
This will parse the current version of your crate and create the semver::Version struct.
pub fn main() {
/// Make sure to include the semver crate
let version: semver::Version = current_semver!();
}
Example output
pub fn main() {
let version = semver::Version { major: 1, minor: 1, patch: 0, pre: semver::Prerelease::new("BETA").unwrap_or_default(), build: semver::BuildMetadata::default() };
}