fedimint_core/
version.rs

1/// Get the  cargo package version of `fedimint-core`
2pub fn cargo_pkg() -> &'static str {
3    env!("CARGO_PKG_VERSION")
4}
5
6/// Get the git hash version of `fedimint-core`
7///
8/// Note, in certain situations this not be accurate (eg. might be all `0`s).
9///
10/// The return value was injected via `fedimint-build` crate at the compile
11/// time.
12pub fn git_hash() -> &'static str {
13    option_env!("FEDIMINT_BUILD_CODE_VERSION").unwrap_or("0000000000000000000000000000000000000001")
14}