2.4. Building a Rust project
Build your Rust project by using the Cargo build tool. Cargo resolves all dependencies of your project, downloads missing dependencies, and compiles it by using the rustc compiler.
By default, projects are built and compiled in debug mode. For information on compiling your project in release mode, see Building a Rust project in release mode.
Prerequisites
Procedure
In the Rust project directory, build the project:
$ cargo buildTo verify that your Rust program can be built when you do not need to build an executable file, enter:
$ cargo check