-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue for different-binary-name #9778
Comments
artifact_name? |
Current implementation uses |
I tested this feature with tp-note and common Linux targets. It works well for me. Also Any chances to get this stabilized in the near future? |
I think that Could this be abused to hide malicious programs when installing a crate? Suppose a bin crate sets the target file name to Maybe:
|
I'm not a fan of this because it's "impure"; two invocations of
I think this is still abusable because one could, for example, release a malicious cargo plugin named something like Instead of either of these, I suggest simply enforcing nothing but instead printing out the names of the commands added to |
Also, I suggest |
Relies on the unstate cargo feature `different-binary-name`. rust-lang/cargo#9778
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
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.name
to not be restricted to identifiers, but if it is not an identifier, require acrate-name
field.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.
The text was updated successfully, but these errors were encountered: