twelf
twelf copied to clipboard
Twelf is a configuration solution for Rust including 12-Factor support. It is designed with layers in order to configure different sources and formats to build your configuration. The main goal is to...
I have this: ```rs use clap::Parser; use twelf::config; #[config] #[derive(Parser)] #[clap] struct Config { #[clap( long, short = 's', help = "The server to connect to", display_order = 0 )]...
Add that kind of variant in Layer. ```rust // the custom variant Custom(Box Result>) which would let us use this layer like this let fetch_from_api = || { let res=...
# TODO: - Better error report with explicit layer name - Suggest crates like and add usecases - Support Vault - Implement a trait/api to extend and let users fetch...
Hy, I like your implemantation pretty much and have already mastered to build a configuration which combines everything (defaults, ENV, config.file, CLI). If a field is omitted in the config...
Hey @bnjjj the project looks very promising, I plan to to test it out with clap and I wonder if watch feature as in https://github.com/mehcode/config-rs/blob/master/examples/watch/src/main.rs is supported here. Thanks
It would be cool for applications to support the [XDG basedir spec](XDG_CONFIG_HOME) effortlessly. This can be done by: - Creating a layer to `${XDG_CONFIG_HOME:-$HOME/.config}//`. - Creating a layer for each...
Assuming a (simplified) structure like: ```rust #[derive(Deserialize, Serialize]) struct NetworkConfig { host: String, port: u16, } #[config] struct Config { network: NetworkConfig, } ``` I am trying to figure out...