-
Notifications
You must be signed in to change notification settings - Fork 2.6k
It is not possible to specify a default binary #2200
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
👍 , with the default default being set to |
Do you think something like |
I'd be a little hesitant to move on this just yet. For example there are other questions I'd have such as:
I'd want to flesh this out a bit more and see how it fits into the whole Cargo picture before landing it. FOr now |
I agree, I will think this through. |
+1 |
I think having a Using git(1) as an example:
When using Hypothetically imaging implementing this using cargo, calling |
If developing using VSCode, the RustyCode plugin requires only one binary to be specified. So I think this feature could be useful. |
What is the status of this issue right now? It is very helpful if you have multiple binaries in a project! |
I feel like test binaries are a very separate thing anyway, and
I think this should affect |
What about something in the [[bin]]
name = "my-default-executable"
default = true That fits into the existing way to configure binaries and will support future additions as well since it isn't as "one-off" as "default-run". :) |
what's the status of this, is it already possible? |
implement default-run option to set default binary for cargo run The implementation is not pretty but as good as I could make it. The fact that all this logic in `cargo_run` is for diagnosis only and essentially just re-implements the filtering done elsewhere really threw me off. Fixes #2200
An example usage of this now-merged feature is here: |
TL;DR it works this way:
|
I think it would be really great if one would be able to specify a default binary in
Cargo.toml
, socargo run
could be used without--bin
argument when there are more binaries in a crate.The text was updated successfully, but these errors were encountered: