#env-var #command-line-arguments #configuration #config-parser #codegen #environment #arguments

build configure_me_codegen

A library for easy processing of application configuration from files, environment variables and command line arguments

22 releases

Uses old Rust 2015

0.4.8 Sep 12, 2024
0.4.5 Aug 16, 2024
0.4.4 Mar 18, 2023
0.4.3 Nov 16, 2022
0.3.2 Nov 8, 2018

#404 in Configuration

Download history 396/week @ 2024-07-28 392/week @ 2024-08-04 459/week @ 2024-08-11 770/week @ 2024-08-18 462/week @ 2024-08-25 644/week @ 2024-09-01 765/week @ 2024-09-08 489/week @ 2024-09-15 754/week @ 2024-09-22 753/week @ 2024-09-29 700/week @ 2024-10-06 1177/week @ 2024-10-13 769/week @ 2024-10-20 918/week @ 2024-10-27 895/week @ 2024-11-03 750/week @ 2024-11-10

3,478 downloads per month
Used in 24 crates (19 directly)

MITNFA license

145KB
3K SLoC

Configure me - codegen

Code generator from configure_me - a Rust library for processing application configuration easily.

About

This crate aims to help with reading configuration of application from files, environment variables and command line arguments, merging it together and validating.

This is the codegen part of configure_me. Please refer to configure_me for full documentation.

License

MITNFA


lib.rs:

This is the codegen part of configure_me crate. Please refer to the documentation of configure_me for details.

Beautiful error messages

This crate supports emitting beautiful, Rust-like, error messages from build script. This improves developer experience a lot at the cost of longer compile times. Thus it is recommended to turn on the feature during development and keep it off during final release production build. To emit beautiful messages activate the spanned feature.

Unstable metabuild feature

This crate supports nightly-only metabuild feature tracked in https://github.com/rust-lang/rust/issues/49803 Since it is unstable you have to opt-in to instability by activating unstable-metabuild Cargo feature. If you enable it you don't have to write build script anymore, just add metabuild = ["configure_me_codegen"] to [package] section of your Cargo.toml. Note that you still have to specify the dependency (with the feature) in [build-dependencies].

No guarantees about stability are made because of the nature of nightly. Please use this only to test metabuild feature of Cargo and report your experience to the tracking issue. I look forward into having this stable and the main way of using this crate. Your reports will help.

Dependencies

~1–8.5MB
~71K SLoC