Skip to content
Justice Tech School

Rust Get Started

Install Rust with rustup, which also installs cargo. Create a project with cargo new hello, then build and run it with cargo run. You can also compile one file with rustc main.rs.

Example
// Terminal:
//   cargo new hello
//   cd hello
//   cargo run
fn main() {
    println!("Hello, world!");
}

Exercise

Run a Cargo project.

cargo 

Quiz Test

Which tool builds Rust projects?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.