Skip to content

Tracking Issue for different-binary-name #9778

Open
@ehuss

Description

@ehuss

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 a crate-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 for CARGO_BIN_NAME since the use case for that was reflecting the executable name in things like clap 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: 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.S-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.

    Type

    No type

    Projects

    Status

    Unstable, baking

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions