you can compile cargo project with cargo build while in the project directory, or use cargo run to compile and run all in one command.
if you did not change the source code, cargo won’t compile it again.
use cargo build --release to compile your code with optimizations. the executable will be in target/release.