Replies: 1 comment 3 replies
-
clap-verbosity-flag is an example of a crate exposing arguments that can be pulled into another CLI. This builds on the same traits used in the derive API. In the derive reference, we document how to make them work between builder and derive APIs |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey so i was wondering, let's say i make a project
foo
that uses clap and has some command line arguments, but it is alsoexposed as a library so the crate can be used as a dependency by other projects.
is there a way to design
foo
such that a projectbar
could usefoo
as dependency with its default command line arguments but add its own on top ?if so, how would you go about doing it in a clean way ?
i was able to make my whole lib extensible except the clap part and it would be neat if i could that way you wouldn't need to reimplement the default arg parsing part on libs that depends on my crate.
Thank you very much for the reply ! :)
Beta Was this translation helpful? Give feedback.
All reactions