-
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
Option to disable installation with install
#13699
Comments
Could you help me understand what would be the point of publishing the bin package if it isn't meant to be installed? |
It's nice to have projects up on crates.io since it's how many Rust users discover crates in the first place. And I think not publishing a crate would make other things difficult, like putting code documentation up on docs.rs. It's extra awkward with crates that are both bins and libraries, though I suppose you could make a separate unpublished crate for the bin... but that feels hacky. |
If you have a lib, that makes sense. If you are using crates.io to post a bin for the sake of advertising, that sounds more like a hack than anything else.
Not hacky and there are lots of good reasons to split bins and libs into separate packages, for example
You can also use |
@epage Hmm. Okay, I see what you mean, and I'm convinced. Closing the issue. |
Problem
Some crates require extra processing that
cargo install
cannot provide even with build scripts (e.g., fish-shell/fish-shell#10181), causing them to be broken without warning.Proposed Solution
Provide a config option on a bin that prevents it from being installed with
cargo install
, with an error message telling the user to refer to the crate's documentation or repository instead. Maybe also provide a flag that forces an install with a warning.Notes
No response
The text was updated successfully, but these errors were encountered: