Hello World and Program Structure
Write your first Rust program and learn what fn main and println! do.
View lesson →Learn Rust syntax step by step: variables, types, strings, conditions, loops, functions, arrays, vectors and input.
Try Rust onlineWrite your first Rust program and learn what fn main and println! do.
View lesson →Declare variables with let, allow changes with mut, and use constants and shadowing.
View lesson →Work with integers, floating-point numbers, booleans and characters, and convert between them.
View lesson →Use arithmetic, comparison and logical operators, and see how integer division works.
View lesson →Create, grow, search and split text with Rust's two string types.
View lesson →Choose what runs with if, else if and else, and use if as an expression.
View lesson →Repeat code with for over a range, while with a condition, and loop with break.
View lesson →Group values with tuples and store a fixed number of items in an array.
View lesson →