#configuration #arguments #environment #codegen

build configure_me_codegen

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

18 releases

Uses old Rust 2015

0.4.4 Mar 18, 2023
0.4.3 Nov 16, 2022
0.4.2 Feb 17, 2022
0.4.1 Aug 21, 2021
0.3.2 Nov 8, 2018

#528 in Configuration

Download history 1932/week @ 2023-11-06 2326/week @ 2023-11-13 2794/week @ 2023-11-20 2371/week @ 2023-11-27 3083/week @ 2023-12-04 4417/week @ 2023-12-11 2769/week @ 2023-12-18 1456/week @ 2023-12-25 3091/week @ 2024-01-01 2787/week @ 2024-01-08 3426/week @ 2024-01-15 3381/week @ 2024-01-22 2010/week @ 2024-01-29 3082/week @ 2024-02-05 3071/week @ 2024-02-12 3664/week @ 2024-02-19

11,978 downloads per month
Used in 23 crates (18 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.3–2.2MB
~40K SLoC