Home / Software Engineering
Use Rustup, which manages your Rust installation(s), makes upgrades easy, and lets you easily install different toolchains and stuff.
cargo runcargo build
target/<profile>/<name>cargo testcargo clean
target directory by default).cargo clippy
-D warnings) must be placed after -- in the command.[--] -D warnings to fail on any warnings.[--] -A clippy::branches-sharing-code (example) to ignore (allow) certain lints.--all-targets --all-features to test all targets and all features too.cargo update
Cargo.toml before this.cargo tree
cargo tree -e featurescargo tree -dcargo tree -i <package> (useful with e.g. -e features)cargo fix --edition to automatically fix your code.edition in config.toml (e.g. from 2018 to 2021).cargo build or cargo test to verify it worked.