9 releases

new 0.3.4 Jul 9, 2024
0.3.3 Feb 3, 2024
0.3.2 Jan 30, 2024
0.3.0 May 24, 2023
0.1.1 Jan 10, 2023

#688 in Build Utils

Download history 482/week @ 2024-03-13 319/week @ 2024-03-20 357/week @ 2024-03-27 391/week @ 2024-04-03 347/week @ 2024-04-10 350/week @ 2024-04-17 248/week @ 2024-04-24 249/week @ 2024-05-01 324/week @ 2024-05-08 296/week @ 2024-05-15 360/week @ 2024-05-22 293/week @ 2024-05-29 300/week @ 2024-06-05 217/week @ 2024-06-12 186/week @ 2024-06-19 99/week @ 2024-06-26

848 downloads per month
Used in noosphere-cli

MIT/Apache

80KB
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

~1–12MB
~122K SLoC