Rustc
Rustc handles Rust compilation rustc main.rs
Cargo
Cargo is Rust’s build system and package manager
Cargo commands
Create project
cargo new hello_cargoBuild project
cargo buildBuild & run project
cargo run-
Backtrace
When you want to see an error backtrace set the
RUST_BACKTRACEenvironment variable:RUST_BACKTRACE=1 cargo run
Check code
cargo checkBuild for release
cargo build --releaseCargo.toml
[package]
name = "hello_cargo"
version = "0.1.0"
authors = ["Your Name <you@example.com>"]
edition = "2018"
[dependencies]