Rust

Hello world

fn main() {
    println!("Hello world!")
}

rustc

Cargo

Comments

Functions

Associated functions

Variables

// without type annotation
let cars = 2;

// with type annotation
let cars: i32 = 2;

// multiple variables
let (cars, trucks) = (2,4);
// make variable mutable by adding 'mut' keyword before variable name
let mut cars = 2;

const

const PI: f64: 3.14