-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Summary
Original issue: #1706
Implementation: #9627
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#different-binary-name
The different-binary-name feature allows setting binary output filenames that are separate from the crate name, and are not restricted to Rust identifiers.
Unresolved issues
- Consider other ways of specifying the setting. There is some concern that
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.- Change
nameto not be restricted to identifiers, but if it is not an identifier, require acrate-namefield.
- Consider supporting other targets, like cdylibs or static libs. This can get tricky if a library is also built as an rlib.
- Is using the filename the correct choice for
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?
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status