cgx 0.0.8

Rust equivalent of uvx or npx, for running Rust crates quickly and easily
Documentation
1
2
3
4
5
6
7
8
9
10
11
use vergen_gix::{Emitter, GixBuilder};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Generate the git version information which will be available at compile time in env vars
    // that are used to construct the `--version` output of the binary.
    let gix = GixBuilder::default().sha(true).commit_date(true).build()?;

    Emitter::default().add_instructions(&gix)?.emit()?;

    Ok(())
}