Rust Variables & Data Types Tutorial | Learn Rust Basics for Beginners (2026)

13views
1likes
0
3:58
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
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

Duration

3:58

Published

December 21, 2025

Added to Codegiz

March 15, 2026

Open in YouTube