Open Kixunil opened 2 months ago
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
but it's pretty annoying and requires a ton of duplication
Exactly, configure_me
removes the duplication entirely.
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 handlesOsString
/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.)