-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuration by config file #133
Comments
There are Rust libraries that allow us to read from multiple formats and also to allow environment overrides. https://github.com/SergioBenitez/Figment A minimal feature set for us probably includes:
|
I've evaluated Figment and config-rs and written up my thoughts in this issue comment. I find some of figment's design decisions more aligned with my expectations, but it hasn't been touched in over a year and has some out-of-date dependencies. I'm inclined to fork it and update the deps ourselves and then use it. |
Closed by #149 |
We've outgrown command-line only configuration.
When it comes to configuration files there's a tricky balance; on one hand we don't want to stray too far from expected practices; on the other hand, common practices are fractured and leave a lot to be desired.
Some things to consider:
Some options:
TOML
: Rust projects tend to favor it.YAML
: Popular with Go/CNCF projects, but No Body Wants To Write YAML. Superficially a superset of JSON, making it very easy to generate universally, but not without footguns.JSON
: Good for generating but not for human-generated configuration.Dhall
: Has some nice neat ideas but overcomplicated for our use case and still pretty obscure.CUE
: Exposes less complexity than Dhall although it has a similarly thoughtful design. It could be a nice user experience with the right tooling, but I don't think the tooling is mature enough yet. Mostly targets the Go ecosystem currently.Nickel
: Cool but too programming-languageyThe text was updated successfully, but these errors were encountered: