8 releases

0.3.3 Feb 3, 2024
0.3.2 Jan 30, 2024
0.3.0 May 24, 2023
0.2.0 May 18, 2023
0.1.1 Jan 10, 2023

#630 in Build Utils

Download history 306/week @ 2024-01-04 336/week @ 2024-01-11 334/week @ 2024-01-18 354/week @ 2024-01-25 786/week @ 2024-02-01 662/week @ 2024-02-08 575/week @ 2024-02-15 465/week @ 2024-02-22 354/week @ 2024-02-29 431/week @ 2024-03-07 463/week @ 2024-03-14 294/week @ 2024-03-21 368/week @ 2024-03-28 383/week @ 2024-04-04 351/week @ 2024-04-11 328/week @ 2024-04-18

1,466 downloads per month
Used in noosphere-cli

MIT/Apache

79KB
2K SLoC

vergen-pretty

A pretty printer for vergen generated environment variables


lib.rs:

vergen-pretty - A pretty printer for vergen environment variables

Because cargo doesn't pass compile time environment variables to dependencies, the vergen_pretty_env macro embeds a map of all the possible vergen environment variables with option_env!. Values not set in by your build.rs are skipped when pretty-printing the output.

Example

let mut stdout = vec![];
PrettyBuilder::default()
    .env(vergen_pretty_env!())
    .build()?
    .display(&mut stdout)?;
assert!(!stdout.is_empty());

See the Pretty documentation for more examples

Features

vergen-pretty has two feature toggles allowing you to customize your output. No features are enabled by default.
You must specifically enable the features you wish to use.

Feature Enables
color Colorize output, allow configuration of coloring via console
header Generate pretty printed header output based on the given Config
trace Enable support for tracing output

Dependencies

~2–12MB
~138K SLoC