-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Clarified naming convention for Cargo #26032
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
Conversation
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (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 the contribution instructions for more information. |
@@ -33,7 +33,8 @@ $ mv main.rs src/main.rs | |||
``` | |||
|
|||
Note that since we're creating an executable, we used `main.rs`. If we | |||
want to make a library instead, we should use `lib.rs`. | |||
want to make a library instead, we should use `lib.rs`. This convention is required | |||
for Cargo to successfully compile our projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the thing is, it's not actually required. It's just convention. You can override the convention if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. I'm new to Rust so sorry for the misunderstanding. I've added that and committed the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's totally okay! :)
Thank you so much! One or two nits. |
@bors: r+ rollup |
📌 Commit ac3301e has been approved by |
Looks great! Now we wait on bors. Thanks for the patch! |
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.
💔 Test failed - auto-linux-64-nopt-t |
@bors: retry On Fri, Jun 5, 2015 at 4:02 PM, bors [email protected] wrote:
|
⚡ Previous build results for auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt... |
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.