liveBook · Manning

Cargo run

cargo run is a Cargo subcommand that builds and executes a Rust package’s binary target.

How 2 Manning books explain it

Learn Rust in a Month of Lunches

cargo run is a Cargo subcommand that builds and runs a Rust binary target while resolving its dependencies.

How it is used
Builds and runs a Rust project while bringing in the external crates its dependencies need.
How deep it goes
Walks through dependency-compilation output and a faster incremental rerun without detailing Cargo internals.
Examples
Shows a random-letter program using rand and compile logs from its initial and subsequent runs.
What you can do after
Operate/configure it to run a Cargo project with a declared external dependency and recognize when dependencies are recompiled.

Read how Learn Rust in a Month of Lunches explains cargo run →

Rust in Action: Systems programming concepts and techniques

cargo run is a Cargo subcommand that builds a Rust project and executes its resulting binary.

How it is used
Runs a Rust project while handling the build needed to produce its executable.
How deep it goes
Explains build output, generated files, and common flags, then exposes the compiler invocation with verbose output.
Examples
Uses a new Hello World project, a CSV-processing program, and a single-file project migrated to Cargo.
What you can do after
Operate/configure it to run a project in debug or release mode and adjust the amount of Cargo output.

Read how Rust in Action: Systems programming concepts and techniques explains cargo run →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.