#version

version

A very simple library who’s job is to return the version of your crate if you’re building with Cargo

5 stable releases

Uses old Rust 2015

3.0.0 Mar 28, 2018
2.0.1 Jan 25, 2016
1.1.0 Jan 13, 2016
1.0.0 Jan 8, 2015

#80 in #version

Download history 484/week @ 2021-08-10 493/week @ 2021-08-17 647/week @ 2021-08-24 464/week @ 2021-08-31 648/week @ 2021-09-07 608/week @ 2021-09-14 680/week @ 2021-09-21 575/week @ 2021-09-28 450/week @ 2021-10-05 467/week @ 2021-10-12 517/week @ 2021-10-19 323/week @ 2021-10-26 517/week @ 2021-11-02 346/week @ 2021-11-09 490/week @ 2021-11-16 376/week @ 2021-11-23

1,783 downloads per month
This crate has lost popularity

MIT/Apache

7KB
58 lines

version

version is a very simple library who's job is to return the version of your crate if you're building with Cargo.

Usage:

#[macro_use]
extern crate version;

// ...

version!() // Returns something like "1.0.0"

let ver : Version = FromStr::from_str( version!() ).unwrap();

Notes:

This only works if you're building with Cargo since the macro fetches the version digits from enviroment variables set by Cargo ( CARGO_PKG_VERSION_{MAJOR, MINOR, PATCH} ).

No runtime deps