1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-14 23:55:44 +02:00
tldr/pages/common/cargo-update.md
Managor d0a4ac3bc4
cargo*: add option placeholders and fix some syntax (#17270)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2025-07-20 15:41:22 +00:00

594 B

cargo update

Update dependencies as recorded in Cargo.lock. More information: https://doc.rust-lang.org/cargo/commands/cargo-update.html.

  • Update dependencies in Cargo.lock to the latest possible version:

cargo update

  • Display what would be updated, but don't actually write the lockfile:

cargo update {{[-n|--dry-run]}}

  • Update only the specified dependencies:

cargo update --package {{dependency1}} --package {{dependency2}} --package {{dependency3}}

  • Set a specific dependency to a specific version:

cargo update --package {{dependency}} --precise {{1.2.3}}