-
There is a lack of examples mixing both imperative arg declaration (using We want to use the beta for v3 proc_macro style declaration (because it's awesome), and all our code is currently using v2. We wanted to know if there was any code we could use as example that uses both. If it is possible at all, of course. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
That is a good idea. Currently proc_macro style examples live at https://github.com/clap-rs/clap/tree/master/clap_derive/examples. Each struct/enum will become a |
Beta Was this translation helpful? Give feedback.
-
@hansl You can very well use the That reminded me - the clap's derive will not be 100% back compatible with |
Beta Was this translation helpful? Give feedback.
That is a good idea. Currently proc_macro style examples live at https://github.com/clap-rs/clap/tree/master/clap_derive/examples. Each struct/enum will become a
clap::App
. You can also usecargo-expand
cli to test how the program expands to. Hope that would guide you to create a minimal example.