Skip to content
masterclass Buddy

Rust · Command

cargo add

Adds or updates dependencies in a Cargo.toml manifest. It supports registry packages, local paths, Git repositories, features, dependency sections, and target platforms.

Last updated

Syntax

cargo add [options] crate …
cargo add [options] --path path
cargo add [options] --git url [crate …]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • cargo
  • cargo-remove

Source: cargo add - The Cargo Book. Checked 2026-11-03.