Rust Cargo
Cargo is the official build system and package manager for Rust. It handles tasks like building code, downloading dependencies, and building libraries.
Core Commands
cargo new [name]: Scaffolds a new package.cargo build: Compiles the current package.cargo run: Runs the binary (compiling first if needed).cargo test: Executes unit and integration tests.cargo doc: Generates documentation for the current project and dependencies.cargo publish: Uploads the crate to crates.io.
The Cargo.toml File
This manifest file defines the package's metadata, dependencies, and build configurations (Profiles).
References
- Source:
00_Raw/the-rust-programming-language.md - rust-moc
- rust-modules-and-packages