Home / Software Engineering
Use Rustup, which manages your Rust installation(s), makes upgrades easy, and lets you easily install different toolchains and stuff.
cargo run
cargo build
target/<profile>/<name>
cargo test
cargo 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 features
cargo tree -d
cargo 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.