You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hardcoding configuration makes it annoying to debug things. I suggest to use my crate configure_me to do that and offer making a full PR as well as adding required features (subcommand support) to the library. The primary advantage of configure_me is support of config files and dirs out of the box. configure_me is used in electrs among other projects.
structopt vs configure_me
Common properties
Declarative syntax
Parse and validate Rust types - no manual conversion
Correct support of non-uf8 paths (Path{Buf}, OsStr{ing}); I think structopt requires enabling this explicitly?
Generate help page
Environment variable support
Advantages of configure_me
Support of config files and dirs with ability to override things and include files from arguments
Generate man pages
Explicitly correct GNU-style params/switches (--key val, --key=val, -xyzkval...; maybe structopt is still good enough?)
Toml file enables processing by external tools
MSRV will always support the Rust version available in Debian stable
Advantages of structopt
Not using Toml makes it work with IDEs and the struct is more obvious
Generate shell completions
Mature and popular
Native subcommand support (this should be irrelevant here since I'm willing to add support)
Disclaimer: I may be missing some things, feel free to point out/ask.
The text was updated successfully, but these errors were encountered:
Hardcoding configuration makes it annoying to debug things. I suggest to use my crate
configure_me
to do that and offer making a full PR as well as adding required features (subcommand support) to the library. The primary advantage ofconfigure_me
is support of config files and dirs out of the box.configure_me
is used in electrs among other projects.structopt
vsconfigure_me
Common properties
Path{Buf}
,OsStr{ing}
); I think structopt requires enabling this explicitly?Advantages of
configure_me
--key val
,--key=val
,-xyzkval
...; maybe structopt is still good enough?)Advantages of
structopt
Disclaimer: I may be missing some things, feel free to point out/ask.
The text was updated successfully, but these errors were encountered: