Skip to content

cargo

run

cargo run

install

# builds the project in the current folder
# installs it into ~/.cargo/bin/<project-name> and ./target/release/<project-name>
cargo install --path "."

build

cargo build
cargo build --locked --release

test

cargo test --locked

fmt

  • Format
cargo fmt -- --check

clippy

cargo clippy -- -Dwarnings

new

cargo new "folder"

init

  • Like new, but for an existing folder
cargo new "folder"