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

Consider using configure_me for configuration #231

Open
Kixunil opened this issue Sep 4, 2024 · 2 comments
Open

Consider using configure_me for configuration #231

Kixunil opened this issue Sep 4, 2024 · 2 comments

Comments

@Kixunil
Copy link

Kixunil commented Sep 4, 2024

configure_me is a configuration library optimized for configuring daemons (as opposed to being focused on manually invoked CLI tools) that takes care of consistent argument parsing, env variable parsing and toml config file parsing. It also correctly handles various styles of accepting an option (--foo val, --foo=val, -f val, -f=val, -fval - also with multiple flags in one arg), reports errors quite nicely (WIP to make it even better), allows automatically generating man pages, correctly handles OsString/PathBuf arguments, has numerous commonly-used features and reasonably conservative MSRV (Debian stable, basically).

It's already used by electrs and other projects. I think it would be a great fit here since you're writing a daemon. Feel free to reach out if you need help with it or some special features. (There's a slight complication around build scripts&stuff.)

@Davidson-Souza
Copy link
Collaborator

Thanks for bringing this to my attention, this crate looks amazing! I've been meaning to get all cli options also exposed for the config file, but it's pretty annoying and requires a ton of duplication.

Definitely something I'm looking forward to implement

@Kixunil
Copy link
Author

Kixunil commented Sep 5, 2024

but it's pretty annoying and requires a ton of duplication

Exactly, configure_me removes the duplication entirely.

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