-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Explain the --bin
flag more clearly
#24495
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @huonw (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
This is not accurate, actually. Libraries are also compiled, and can be distributed sans source. The difference is more like 'are you shipping an application or a library?' |
So is the difference a question of what files need to be generated? |
I just ran it both ways. With
Without
Maybe it's silly to explain why at this point in the guide, I just found the flag confusing. I'm only bugging you in the hopes that I'm a representatively confused newbie. 😄 Feel free to close / ignore if you think this isn't useful. |
No, I think it's worth explaining, since 'binary' is overloaded here, but we want to use it to explain why it's |
@nathanl any thoughts here? |
If that's the distinction, I don't think there's a good way to say "--bin actually means 'application'" - it's the flag itself that's confusing. The real fix would be for cargo to deprecate Short of that, maybe the docs should just acknowledge "this flag is confusingly-named, but you use --bin when you want to make a standalone application as opposed to a library." And possibly, "It will be compiled to a binary in the end either way." |
I mean, calling compiled programs 'binaries' has a loooong history. It's just a word that's overloaded due to context. |
Maybe referencing bin/ and lib/ in the posixfs layout? On Monday, May 18, 2015, Steve Klabnik notifications@github.com wrote:
|
Yep, you're right, and so is @richo. How about saying something like "We're passing |
@nathanl that sounds good to me. Are you interested in updating this PR? Sorry that it got lost in the shuffle :( |
@steveklabnik Yep, updated. 😄 |
Awesome! This looks great, with a few smallll details: single quotes should be used for emphasis in this way, not double quotes. And, they should be curly quotes, and the period should move. :) I know these quotes can be weird, so here's the text, if you don't want to figure out how to type them: https://gist.github.com/steveklabnik/0ab6e31bb638263c196b After that, let's get this merged! Sorry it's been so nitpicky :( |
No problem. I've made the tweaks and would like to squash my commits down to one, but so far I've just done edits straight from the Github interface and have to clone the project to do the squash. 41k commits take a while to clone... 😄 |
@steveklabnik Squashed and ready to merge! |
@bors: r+ rollup |
📌 Commit a47d7a7 has been approved by |
Thanks so much! |
⌛ Testing commit a47d7a7 with merge 8d24f83... |
💔 Test failed - auto-linux-32-opt |
@bors: retry On Thu, Jun 11, 2015 at 9:38 PM, bors notifications@github.com wrote:
|
⌛ Testing commit a47d7a7 with merge b3a2a1c... |
…=steveklabnik Explain the --bin flag in terms of the difference between shipping binary and library code I'm not sure if my explanation is even quite correct, but as a newbie coming from Ruby, this is my best guess. (In Rubyland, libraries always ship with the source code because there's no other form you can ship. :) )
⛄ The build was interrupted to prioritize another pull request. |
Explain the --bin flag in terms of the difference
between shipping binary and library code
I'm not sure if my explanation is even quite correct, but as a newbie coming from Ruby, this is my best guess. (In Rubyland, libraries always ship with the source code because there's no other form you can ship. :) )