In Rust, how can I implement argument parsing like what cargo does here?
cargo run -v -- -w
-v is a cargo option, but -w becomes an option on the executable cargo builds.
I would like my software to do the same thing. I.e. my user provides options to my executable before --, but then any arguments after -- forward to a different executable that my executable invokes.
Is this possible using clap?
This is possible using the
Arg::raw()method.Using the derive syntax: