Rust Variables & Data Types Tutorial | Learn Rust Basics for Beginners (2026)
13views
1likes
03:58
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Master the fundamentals of Rust programming! Learn how to declare variables, use mutability, understand data types, and perform arithmetic operations.
š„ In This Tutorial:
āāāāāāāāāāāāāāāāāāāāāāā
0:00 - Intro
0:06 - Variables & Mutability (let vs let mut)
1:23 - Data Types (i32, f64, bool, &str)
2:36 - Arithmetic Operations (+ - * / %)
3:51 - Outro
š What You'll Learn:
āāāāāāāāāāāāāāāāāāāāāāā
ā
let keyword for immutable variables
ā
let mut for mutable (changeable) variables
ā
Integer types (i32) for whole numbers
ā
Floating point (f64) for decimals
ā
Boolean (bool) for true/false
ā
String slices (&str) for text
ā
All arithmetic operators: + - * / %
š» Code Examples:
āāāāāāāāāāāāāāāāāāāāāāā
// Immutable variable
let x = 5;
// Mutable variable
let mut y = 10;
y = 20; // This works!
// Data types
let age: i32 = 25;
let price: f64 = 19.99;
let is_rust_fun: bool = true;
let language: &str = "Rust";
// Arithmetic
10 + 3 = 13
10 - 3 = 7
10 * 3 = 30
10 / 3 = 3 (integer division)
10 % 3 = 1 (remainder)
ā” Key Concepts:
āāāāāāāāāāāāāāāāāāāāāāā
ā Variables are IMMUTABLE by default in Rust
ā Add 'mut' keyword to allow changes
ā Rust is strongly typed
ā Integer division drops decimals
ā Modulo (%) gives the remainder
š ļø Tools Used:
āāāāāāāāāāāāāāāāāāāāāāā
ā rustc (Rust compiler)
ā nvim (code editor)
š Like & Subscribe for more Rust tutorials!
#rust #rustlang #programming #tutorial #beginners #variables #datatypes #coding #learnrust
Back to tutorialsOpen in YouTube
Duration
3:58
Published
December 21, 2025
Added to Codegiz
March 15, 2026