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 tutorials๐ Read the articleOpen in YouTube
Duration
3:58
Published
December 21, 2025
Added to Codegiz
March 15, 2026