⚙️

Rust Reference

A language focused on performance, safety, and conciseness, especially for systems programming. Essential syntax and code samples for professional development.

Cargo

cargo build cargo run

Constants

const MAX_VAL: u32 = 100_000;

Shadowing

let x = 5; let x = x + 1;

Functions

fn add(x: i32, y: i32) -> i32 { x + y }

Enums

enum Message { Quit, Move { x: i32, y: i32 } }

Refs

let s = String::from("hi"); let len = calculate_len(&s);