Confpiler (crate)
This crate provides a mechanism for "compiling" an ordered set of configuration files into a single, flattened representation suitable for exporting to environment variables.
Transforming
## default.yaml
foo:
bar: 10
baz: false
hoof: doof
## production.yaml
foo:
baz: true
into something like
"FOO__BAR": "10"
"FOO__BAZ": "false"
"HOOF": "doof"
via
use FlatConfig;
let = builder
.add_config
.add_config
.build
.expect;
All values are converted to strings, with simple arrays being collapsed to
delimited strings (with the default separator being ,).
This does not support arrays containing more complex values like other arrays and maps.
The following formats are currently supported:
- JOSN
- TOML
- YAML
- INI