Skip to content
masterclass Buddy

Rust · Command

cargo run

cargo run builds and runs a binary or example in the local package. Arguments after -- go to the program; arguments before it go to Cargo.

Last updated

Syntax

cargo run [ options ] [ -- args ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • cargo-build
  • cargo-test
  • cargo-bench
  • cargo-pkgid

Source: cargo run - The Cargo Book. Checked 2026-11-03.