-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Tracking Issue for different-binary-name #9778
Copy link
Copy link
Open
Labels
A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)C-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.S-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Metadata
Metadata
Assignees
Labels
A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)C-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.S-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Unstable, baking
Summary
Original issue: #1706
Implementation: #9627
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#different-binary-name
The
different-binary-namefeature allows setting binary output filenames that are separate from the crate name, and are not restricted to Rust identifiers.Unresolved issues
filenamemay be misleading, particularly if we decide to use it for libraries where there is a prefix/suffix added. Other options to consider:file_stem, though this may also be confusing with library prefix/suffix.nameto not be restricted to identifiers, but if it is not an identifier, require acrate-namefield.CARGO_BIN_NAME? There is some concern that this is introducing some inconsistencies that can cause confusion (for example,--binuses the name and not the filename). The actual executable name was chosen forCARGO_BIN_NAMEsince the use case for that was reflecting the executable name in things likeclaphelp text. How much of a problem are these inconsistencies going to be?cargo newto suggestbin.filenamefor invalid crate names (see cargo init claims you can make a binary called "udpinject.rs" by configuring "udpinject-rs" ex post. This is forbidden actually. #16396)Future extensions
N/A
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.