vne 0.0.1

Environment variables.
Documentation
  • Coverage
  • 20%
    1 out of 5 items documented1 out of 4 items with examples
  • Size
  • Source code size: 8.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.39 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 24s Average build duration of successful builds.
  • all releases: 24s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oscartbeaumont

vne

[!WARNING] This is just an proof of concept of a stupid idea I had. It is probably not ready for use.

Environment variables.

Usage

You can setup vne in your main.rs like the following:

fn main() {
 // This will ensure all variables declared by a usage of `vne!` exist.
 ENV.validate().unwrap();

 // The rest of your code
 let testing: String = vne::vne!("TESTING");
}

// It is *really* important this is in `main.rs` and at the bottom of the file!
const ENV: vne::Environment = vne::build!();

Framework integration

You can statically analyze the environment variables that exist within your project. This could be used by a framework to show warning at deploy time for example. You can read the target/vne file and parse it with in the following format:

{time}\n
# The following repeats
{crate_name}\t{bin_name}\t{env_1}\t{env_2}\n

Inspiration

We make use of the pattern which I originally came across in macro_state.