#environment #toml #env #settings #configuration

confyg

A simple, TOML-based, ENV-enabled library that can find and merge configs

7 releases

0.2.0 Mar 11, 2023
0.1.4 Feb 6, 2023
0.1.3 Nov 21, 2022
0.0.0 Nov 13, 2022

#822 in Configuration

Download history 3/week @ 2024-01-01 5/week @ 2024-02-19 47/week @ 2024-02-26 4/week @ 2024-03-04 12/week @ 2024-03-11 1/week @ 2024-03-18 107/week @ 2024-04-01

121 downloads per month
Used in 4 crates (2 directly)

Apache-2.0

18KB
408 lines

confyg

A simple, TOML-based, ENV-enabled library that can find and merge configs

Usage

Be sure to see the examples (and the Makefile, for how to run some of them with environment variables set).

Note that due to the fact that environment variables don't support the use of the . in variable names, the toml library's hierarchichal feature is not usable when you want to merge environment-based configs and string- or file-based configs with sections that have . in their names. You can get around this to a certain extent with underscores and switching up how you relate your Rust structs to sections (see the ./examples/env* examples).

License

Copyright © 2022, Oxur Group

Apache License, Version 2.0

Dependencies

~280–530KB
~12K SLoC