Uwes Blog


Rust Quick Tips

cargo project commands

commanddescription
cargo run -- --arg --arg1 testRun executable with commandline arguments
cargo test -- --nocaptureDisplay stdout during testrun
cargo doc --no-depsCreate documentation without dependencies
cargo doc --openCreate local full documentation and open it in browser
cargo fmtFormat sourcecode in project
cargo treeShow dependencie tree

cargo commands

commanddescription
cargo install [crate]Install [crate]
cargo uninstall [crate]Uninstall [crate]
cargo install --listList all installed crates

cargo plugins

plugindescription
expandexpand Rust macros
outdatedcheck for outdated dependencies
bloatspace used by functions in executable
auditcheck for security vulnerabilities in libs
debcreate debian package

warning settings

See also the Lint Listing in the Rust Documentation

#![warn(missing_debug_implementations)]
#![warn(missing_docs)]