cfg-rs-0.1.0 has been yanked.
cfg-rs
cfg-rs provides a layered configuration formed by multi config source for rust applications.
Former crate salak.rs.
This lib supports:
- Easy to use, one line to create, [
Configuration::init]. - Mutiple sources, such as environment variables, toml, yaml and json.
- Easily extends config source by implementing [
crate::source::file::FileConfigSource]. - Programmatic override config by [
ConfigurationBuilder::set]. - Auto derive config struct by proc-macro.
- Placeholder parsing with syntax
${config.key}. - Using placeholder expresion to get random value by
${random.u64}, support all integer types.
See the examples for general usage information.