rust-lang / rust-lang/book

Use `cargo add` when using external crates

Open
#3,910 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2024-fix-nomination
Dominant language
Rust
Stars
18.3k
Forks
4.1k
Avg merge
14m
Merged PRs (30d)
1

Description

Maybe giving a copy-pasteable cargo add rand@version command would prevent issues we've seen in the past when a newer version of rand is available with breaking changes, and people install the latest version instead of the version in the book?

Anyway, cargo add is nice and we should show it off now that it's stable!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the book for instructions that add external crates, especially the example involving rand. Review how those instructions currently specify dependencies, then update the relevant examples to show copy-pasteable cargo add commands with the intended version. Done means readers are directed to install the same dependency version used in the book.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.