Loading tutorials
let statement, the construct Rust uses to bind a value to a name. Later chapters cover mutability, shadowing, and types in detail. Here the goal is to understand what a binding is, which forms let can take, and which errors you will meet first.6 min readcargo run or rustc, and that you have seen let before. It also assumes you can read a compiler error. The previous chapter covered declaring variables. This one covers why Rust makes them read-only unless you ask otherwise, w7 min readlet creates a binding, and you know that bindings are immutable by default. Here you will learn what mut changes, what it leaves alone, and how to decide when a variable should be mutable.6 min readcargo run or rustc. It also assumes you know how let creates a binding and how mut allows reassignment. Here you will learn what shadowing is, how it differs from mutation, and when to use each.6 min readconst and static. It assumes you know let bindings, mut, and basic types such as u32 and &str. It also assumes you can read a compiler error. Neither item is a variable in the let sense. Each is declared at the top level of a module6 min readlet bindings, know the basic scalar type names (i32, f64, bool, char), and can read a simple compiler error. It covers how Rust decides the type of a binding, when you must state it yourself, and how to read the errors that appear when inference fails.7 min readlet, use mut, and read a basic compiler error. It covers the integer types Rust offers, how the compiler picks one, and how to write integer values in source code. Overflow behavior and conversions between types get their own chapters, so they a5 min readf32, f64), the boolean bool, and the Unicode character char. It assumes you know let bindings, type inference and annotations, and the integer types from the earlier chapters. It also assumes you can run a prog5 min readu8, i32, usize and so on), can run a program with cargo run, and can read a panic message. It covers what happens when arithmetic produces a value that does not fit in the type, why the answer depends on the build profile, and which tools m7 min readlet bindings, use mut, and read the integer and float types from earlier chapters. It also assumes you can run a program with cargo run or rustc. Here you will learn how Rust groups several values into one, and how tuples and arrays differ in type, size, an7 min readas, From/Into, TryFrom/TryInto, and parse) and how to pick between them.5 min readlet and mut, shared references (&T) and mutable references (&mut T), and basic structs with methods. It also assumes you can read a simple compiler error. You do not need Rc, threads, or traits beyond Copy.6 min read