comfy-git-version 0.4.0

A comfy fork of git-version: compile the git version (tag name, or hash otherwise) and dirty state into your program.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 5.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 522.94 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • m-ou-se/rust-git-version
    128 16 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • darthdeus

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