Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wyatt-herkamp/current_semver
https://github.com/wyatt-herkamp/current_semver
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wyatt-herkamp/current_semver
- Owner: wyatt-herkamp
- License: apache-2.0
- Created: 2023-04-14T17:10:35.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-02T15:02:53.000Z (about 1 year ago)
- Last Synced: 2024-09-13T02:39:12.826Z (about 2 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
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() };
}
```