Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

cargo

Cargo — Rust's package manager.

referencedescription
conceptspackage, crate, target, registry, cargo home
manifestCargo.toml, package, lib, crate-type
dependenciesdependencies, version requirements, git/path deps
featuresfeatures, feature unification, resolver
workspacesworkspace, members, virtual manifest, inheritance
profilesprofile.dev, opt-level, lto, panic, debug
build-scriptsbuild.rs, build dependencies, OUT_DIR, cargo::rerun
config.cargo/config.toml, config hierarchy, rustflags
registriescrates.io, custom registries, source replacement
commandscargo build/test/run/add/update, common flags
environmentCARGO_HOME, CARGO_PKG_*, RUSTFLAGS, build env vars
lockfileCargo.lock, lockfile format, cache, target directory