Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wyatt-herkamp/current_semver


https://github.com/wyatt-herkamp/current_semver

Last synced: 22 days ago
JSON representation

Awesome Lists containing this project

README

        

# current_semver!

This will parse the current version of your crate and create the semver::Version struct.

## Usage

```rust
pub fn main() {
/// Make sure to include the semver crate
let version: semver::Version = current_semver!();
}
```

Example output
```rust
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() };
}
```