-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Describe the problem you are trying to solve
We have a virtual workspace with multiple sub-projects and tools (a workspace containing an app we need during development). Before introducing features we got used to running cargo run --bin, which would then print:
error: "--bin" takes one argument.
Available binaries:
tool_a
tool_b
tool_c
...
Since tools get refactored a lot it was a nice way of seeing all options without too much ceremony. However, after adding features, running cargo run --bin xxx does not reliably produce the desired target anymore, but cargo run -p xxx does, so we tried switching to that one.
However, running cargo bin -p gives:
error: The argument '--package <SPEC>' requires a value but none was supplied
USAGE:
cargo.exe run --package <SPEC>
For more information try --help
Describe the solution you'd like
It would be nice if cargo bin -p lists all projects it can currently run, similar to how --bin works.
Notes
I don't know if -p is more powerful than --bin in the sense that it accepts binaries outside the virtual workspace. In that case it would be nice to still list all local ones, and maybe note that other targets could be available.