Skip to content

Glossary: Rust in Practice

cargo add

A command that adds a dependency to a `Cargo.toml`. `-p` picks the package, `--path` points at a local crate, and `--features` turns on a crate's optional parts.

Where the book teaches it

Related terms

path dependencybuild dependency-p (package flag)