Cheatsheet: Cargo (Rust)
Basic Commands
Create a new Rust project
Build a project
Run a project
Clean up build artifacts
Check project for errors without building
Dependency Management
Add a new dependency
Update all dependencies
List outdated dependencies
Remove a dependency
Testing & Documentation
Run all tests
Run benchmarks
Generate documentation
Open generated documentation
Publishing & Versioning
Publish a crate to crates.io
Check a crate before publishing
Bump version number
Cargo Deny (Dependency Auditing)
Install cargo-deny
Run cargo-deny check for security, licenses, and more
Check for security advisories
Check for outdated dependencies
Check for banned or incompatible licenses
Generate cargo-deny config file