cargo

Rust cargo update

Re-resolve the named dependency within existing requirements. This local workspace has no alternate release, so the example demonstrates lockfile scope rather than upgrading a version. Example format: shell. Run in a disposable copy of v16/fixtures/projects/workspace-demo. Expected result (not executed): The pricing package remains version 0.1.0. Common mistake: Expecting the command to rewrite version requirements in Cargo.toml.

Formal Syntax & Structure

rust syntaxrust
cargo update [OPTIONS]

Working Example

Example Snippetrust
cargo update --offline -p pricing
Rust Reference