Home

Awesome

vergen

vergen, vergen-git2, vergen-gitcl, vergen-gix, vergen-pretty

The vergen suite of tools allow you to embed environment variables generated at build time into your code. For example, I may care about the last git commit number and need to reference it in my code. You can configure one of the vergen git tools in cargo build scripts and can emit a VERGEN_GIT_SHA environment variable for use in your code.

The vergen suite of tools can emit the following output:

vergen-pretty is a macro and pretty printer for vergen based cargo instruction output.

Current Releases

vergen

docs.rs Crates.io Crates.io Crates.io codecov CI sponsor

vergen-git2

docs.rs Crates.io Crates.io Crates.io

vergen-gitcl

docs.rs Crates.io Crates.io Crates.io

vergen-gix

docs.rs Crates.io Crates.io Crates.io

vergen-pretty

docs.rs Crates.io Crates.io Crates.io

MSRV

The current minimum supported rust version is 1.75.0

⚠️ Notes on version 9 ⚠️

Why?

This was done to resolve issues with Cargo feature unification and mutually exclusive features. Previous versions of vergen had 3 mutually exclusive features (git2, gitcl, and gix). Feature unification could cause compilation issues if you had included a dependency that also used vergen but had configured a different git feature. Splitting the git backends into separate libraries helps alleviate this issue.

Migration from version 8

See the documentation at MIGRATING_v8_to_v9.md

Documentation

Contributing

See the documentation at CONTRIBUTING.md

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.