Skip to content
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

2.2. Using config files feedback #212

Open
jpmckinney opened this issue Dec 20, 2022 · 1 comment
Open

2.2. Using config files feedback #212

jpmckinney opened this issue Dec 20, 2022 · 1 comment

Comments

@jpmckinney
Copy link

Going through the TODO on the page:

Evaluate crates that exist

https://docs.rs/config/latest/config/ seems to be the most popular crate.

Cli-args + multiple configs + env variables

clap has an env method/feature that allows setting an environment variable to read from if the CLI argument isn't present

To throw in configuration files, there's an open issue: clap-rs/clap#748 There are also various (less popular) crates that integrate with clap by third-party authors.

Can configure do all this? Is there a nice wrapper around it?

configure hasn't had a release in 5 years. I don't think it's relevant anymore.

@epage
Copy link
Contributor

epage commented Jan 3, 2023

For evaluating which config crate, we have started but not finished https://github.com/rosetta-rs/config-rosetta-rs to compare them. We plan to talk further about them in the WG-CLI meetings

For general layered config, clap's env support is unlikely sufficient. As for layered configs and clap, the most relevant link is clap-rs/clap#2763.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants