1 unstable release
0.1.1 | Oct 2, 2023 |
---|---|
0.1.0 |
|
#1407 in Procedural macros
114 downloads per month
7KB
72 lines
current_semver!
This will parse the current version of your crate and create the semver::Version struct.
Usage
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() };
}
Dependencies
~230–670KB
~16K SLoC