vergen 9.0.0-beta.0

Generate 'cargo:rustc-env' instructions via 'build.rs' for use in your code via the 'env!' macro
Documentation

vergen - A suite of libraries for generating cargo instructions from a build script

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

When used in conjunction with cargo build scripts can emit the following output:

Current Release

vergen

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

⚠️ Notes on version 9 ⚠️

With version 9 comes the introduction of 3 new libraries, vergen-git2, vergen-gitcl, and vergen-gix. Along with this change, the git features has been removed from the base vergen library. The 3 new libraries are intended to be drop in replacements for vergen when you need to generate git based cargo build script instructions. vergen now contains the build, cargo, rustc, and sysinfo feature implementations. These features are re-exported by the new libraries allowing you to configure the output as you have previously.

Why? This was done to resolve issues with Cargo feature unification and mutually exclusive features. Previous version 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.

Version 9 also introduces the AddCustomEntries trait. Implementing this trait allows you to include your own custom Cargo instructions, using vergen as the engine to generate them. See the AddCustomEntries docs for more information.

MSRV

The current minimum supported rust version is 1.70.0

Example Usage

See the documentation at docs.rs for example usage

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.