-
Notifications
You must be signed in to change notification settings - Fork 3.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
RFC: Add example of cargo add
#3331
base: main
Are you sure you want to change the base?
Conversation
Hi! Thank you so much for this! I'm definitely into this, with one caveat: I'm working on a new print version of the book right now that won't include this, so I'm not going to merge this for the online version until I finish that in a few weeks or months. I'm also very impressed that you've successfully figured out how to work with my convoluted listing management!!! I actually haven't had a chance to use Is there a different
I'd prefer this in a separate PR, if you do it at all-- it's not a huge deal for me!
It looks like it's printing the Cargo features available from the crate just added. Sounds like you could send in a
The minimal Rust version is mentioned in the title page, so I don't think it's necessary to reiterate here. |
My bad, I cargo-culted the lockfile from one of the other no-listings where the lockfile has
No, I don't mind at all, I thought it might be confusing for others if I don't "defragment" :)
Ah, cool, thanks! |
…epage Very slight `cargo add` documentation improvements As discussed in rust-lang/book#3331, a quick explanation of the `Features` part of the message that gets printed to stdout when adding some dependency. Consider the following example: ``` cargo add my-crate Updating crates.io index Adding my-crate v0.1.0 to dependencies. Features: + foo - bar ``` It was not clear to me what `+foo` and `-bar` meant until `@carols10cents'` kindly explained it to me. Hopefully the documentation now clarifies this. TODO: - [x] Run `./build-man.sh`
Hi! I'm working through the Rust Book for the first time and I noticed that Cargo supports
cargo add
now. Maybe worth adding that to the book?Progress
cargo add
to add therand
dependency in chapter 2- [ ] Re-number theno-listings
so they appear in chronological order (haven't done this yet to minimise the diff for the RFC phase)- [ ] Explain what the output means (help, I don't know what theFeatures
part means, it's not explained in the Cargo documentation)- [ ] Make a mention of the minimal Cargo version that supports this?Features
output means.