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

๐Ÿ“– Read the articleOpen in YouTube