-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-run
Description
I'd like a way to build only the default run binary, i.e. what cargo run
runs. (I'm writing a subcommand that lets the user run the various binaries cargo builds under a time-travelling debugger. By default, I want to build and run only the default run binary)
Describe the solution you'd like
Either cargo build --default-bin
, or some way to get the name of the default binary.
(I think --no-run
is being phased out. If not, cargo run --no-run
could also be added, although it sounds a little silly.)
Notes
If this is a wontfix I'd like to confirm that the algorithm used by cargo run is as follows.
- main.rs
- bin/foo.rs if only one exists
- value of default-run key in manifest (requires feature: default-run included in
cargo metadata
#9497 to get fromcargo metadata
)
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-run