6 releases

new 0.3.5 Jul 22, 2021
0.3.4 Jan 9, 2020
0.3.3 Oct 8, 2019
0.3.1 May 1, 2019
0.0.1 Feb 23, 2019

#122 in Procedural macros

Download history 10007/week @ 2021-04-02 15448/week @ 2021-04-09 14162/week @ 2021-04-16 9146/week @ 2021-04-23 5598/week @ 2021-04-30 14050/week @ 2021-05-07 18471/week @ 2021-05-14 17061/week @ 2021-05-21 19580/week @ 2021-05-28 26171/week @ 2021-06-04 20765/week @ 2021-06-11 14817/week @ 2021-06-18 18979/week @ 2021-06-25 26939/week @ 2021-07-02 17567/week @ 2021-07-09 20019/week @ 2021-07-16

76,041 downloads per month
Used in 30 crates (via git-version)

BSD-2-Clause

9KB
224 lines

git-version

Embed git information in your code at compile-time.

use git_version::git_version;
const GIT_VERSION: &str = git_version!();

The version number will have a -modified suffix if your git worktree had untracked or changed files.

These macros do not depend on libgit, but simply uses the git binary directly. So you must have git installed somewhere in your PATH.

License: BSD-2-Clause

Dependencies

~360–790KB
~19K SLoC