Cargo


Cargo is the package manager for rust. Like pip for python or npm for node

Create new project


cargo new project_name

This creates a project folder in the directory with name project_name

Project Structure


  • main.rs is the main rust program
  • Cargo.toml contains our config info and dependency information

Run the project


cargo run 

Runs the project on terminal