1
2
3
4
5
6
7
8
9
10
11
12
13
pub struct Version;

impl Version {
    /// Return the current crate version
    pub fn crate_version() -> &'static str {
        env!("CARGO_PKG_VERSION")
    }

    /// Return the hash of the current git commit
    pub fn git_hash() -> &'static str {
        env!("GIT_HASH")
    }
}