Tracking Issue for different-binary-name · Issue #9778 · rust-lang/cargo (original) (raw)
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
filename
may 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
name
to not be restricted to identifiers, but if it is not an identifier, require acrate-name
field.
- 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,--bin
uses the name and not the filename). The actual executable name was chosen forCARGO_BIN_NAME
since the use case for that was reflecting the executable name in things likeclap
help 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.