{"id":57958,"library":"git-version","title":"Git Version","description":"Compile the git version (tag name, or hash otherwise) and dirty state into your program.","status":"active","version":"0.3.9","language":"rust","source_language":null,"source_url":"https://github.com/fusion-engineering/rust-git-version","tags":["git","version","build","compile-time"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ngit-version = \"0.3.9\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add git-version","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"git_version","correct":"use git_version::git_version;"}],"quickstart":{"code":"use git_version::git_version;\n\nfn main() {\n    let version = git_version!();\n    println!(\"Git version: {}\", version);\n}","lang":"rust","description":"Prints the current git version at compile time."},"warnings":[{"fix":"Ensure the build environment has git and the project is in a git repo.","message":"Requires git to be installed and a git repository.","severity":"gotcha","affected_versions":">=0.3.0"}],"env_vars":null,"search_vec":"'build':20 'compil':3,22 'compile-tim':21 'dirti':13 'git':1,5,18 'hash':10 'name':8 'otherwis':11 'program':17 'state':14 'tag':7 'time':23 'version':2,6,19","created_at":"2026-06-16T16:06:05.908644+00:00","updated_at":"2026-06-16T16:06:05.908644+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/fusion-engineering/rust-git-version","github":"https://github.com/fusion-engineering/rust-git-version","docs":"https://docs.rs/git-version/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["build-tool","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}