Learn Rust
A free, interactive online Rust course. You write Rust on every lesson - syntax, ownership and borrowing, lifetimes, traits, pattern matching - with AI hints when the borrow checker pushes back, and a free certificate when you finish.
17,735+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction
4 lessons324- 01RustChallenge
- 02Hello World!ChallengeQuiz
- 03CommentsQuiz
- 04Basic Program StructureChallengeQuiz
Variables Part 1
5 lessons539- 01NumbersChallengeQuiz
- 02CharChallengeQuiz
- 03 StringChallengeQuiz
- 04BooleanChallengeQuiz
- 05Mutable Variables ChallengeQuiz
Variables Part 2
5 lessons433- 01Type DeclarationChallengeQuiz
- 02Naming ConventionsQuiz
- 03Type InferenceChallengeQuiz
- 04Recap - Initialize VariablesChallenge
- 05Type CastingChallengeQuiz
Operators Part 1
5 lessons438- 01Arithmetic OperatorsChallengeQuiz
- 02Modulo OperatorChallengeQuiz
- 03Arithmetic ShortcutsChallengeQuiz
- 04Comparison OperatorsChallengeQuiz
- 05String ComparisonQuiz
Operators Part 2
4 lessons424- 01Logical Operators Part 1ChallengeQuiz
- 02Logical Operators Part 2ChallengeQuiz
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuiz
Decision Making
5 lessons532- 01If ExpressionsChallengeQuiz
- 02If-ElseChallengeQuiz
- 03Match StatementChallengeQuiz
- 04Recap - If ElseChallenge
- 05Nested If - ElseChallengeQuiz
Basic IO
4 lessons417- 01Printing to ConsoleChallengeQuiz
- 02Reading User InputChallengeQuiz
- 03Recap - Till 120Challenge
- 04Recap - True or FalseChallenge
Calculator App
Project4 lessons1- 01Welcome MessageChallenge
- 02Getting NumbersProject
- 03Basic OperationsProject
- 04Formatted OutputProject
Loops
8 lessons851- 01For Over SeriesChallengeQuiz
- 02While LoopChallengeQuiz
- 03BreakChallengeQuiz
- 04ContinueChallengeQuiz
- 05Nested LoopChallengeQuiz
- 06Loop LabelsChallengeQuiz
- 07Infinite LoopChallengeQuiz
- 08Recap - Dynamic InputChallenge
Variable Bindings
4 lessons230- 01ScopeQuiz
- 02Shadowing Part 1ChallengeQuiz
- 03Variable BindingQuiz
- 04Shadowing Part 2ChallengeQuiz
Functions
6 lessons634- 01Declaring FunctionsChallengeQuiz
- 02Parameters and ArgumentsChallengeQuiz
- 03Return ValuesChallengeQuiz
- 04Multiple Return ValuesChallengeQuiz
- 05Recap - Sigma FunctionChallenge
- 06Recap - Validation FunctionChallenge
Arrays Basics
5 lessons430- 01Declaring ArraysChallengeQuiz
- 02Array as ParameterQuiz
- 03Accessing ElementsChallengeQuiz
- 04Modifying ArraysChallengeQuiz
- 05Recap - Pretty Print ArrayChallenge
Arrays Continued
5 lessons423- 01Mutable Reference ArraysChallengeQuiz
- 02Array MethodsChallengeQuiz
- 03Recap - Product ArrayChallenge
- 04Recap - Reversed ArrayChallenge
- 05Better PrintQuiz
Iterating Over Arrays
4 lessons333- 01Range GuideChallengeQuiz
- 02Enhanced For LoopChallengeQuiz
- 03Borrow In LoopQuiz
- 04Common Array OperationsChallengeQuiz
String Operations
4 lessons424- 01String MethodsChallengeQuiz
- 02format! MacroChallengeQuiz
- 03String ConversionChallengeQuiz
- 04Recap - FormatChallenge
Final Projects
3 lessons37- 01Number PatternChallengeQuiz
- 02Pattern FinderChallenge
- 03Student Grade CalculatorChallenge
Section 2
Logic & Flow
Start sectionStartExpandCollapseDevelop problem-solving skills and create dynamic, interactive programsAdvanced Control Flow
6 lessons640- 01The 'match' ExpressionChallengeQuiz
- 02Matching Multiple ValuesChallengeQuiz
- 03Matching RangesChallengeQuiz
- 04The 'if let' ExpressionChallengeQuiz
- 05Loops as ExpressionsChallengeQuiz
- 06Recap - Simple Command ParserChallenge
Introduction to Vectors
8 lessons756- 01What is a Vector?Quiz
- 02Creating a VectorChallengeQuiz
- 03Adding Elements with pushChallengeQuiz
- 04Accessing Vector ElementsChallengeQuiz
- 05Iterating Over a VectorChallengeQuiz
- 06Mutable IterationChallengeQuiz
- 07Removing ElementsChallengeQuiz
- 08Recap - Basic Score TrackerChallenge
Command-Line To-Do List
5 lessons5- 01Project SetupChallenge
- 02Adding a TaskChallenge
- 03Viewing All TasksChallenge
- 04Removing a TaskChallenge
- 05Final CodeChallenge
Grouping Data with Structs
7 lessons650- 01What is a Struct?Quiz
- 02Structs OverviewChallengeQuiz
- 03Accessing Struct FieldsChallengeQuiz
- 04Mutable StructsChallengeQuiz
- 05Structs as Function ParametersChallengeQuiz
- 06Tuple StructsChallengeQuiz
- 07Recap - Create a Book StructChallenge
Key-Value Pairs with Hash Maps
8 lessons653- 01What is a Hash Map?Quiz
- 02Creating a Hash MapQuiz
- 03Inserting Key-Value PairsChallengeQuiz
- 04Accessing ValuesChallengeQuiz
- 05Iterating Over a Hash MapChallengeQuiz
- 06Updating a ValueChallengeQuiz
- 07Removing a PairChallengeQuiz
- 08Recap - Word CounterChallenge
Handling Absence with 'Option'
7 lessons645- 01What is an 'Option'?Quiz
- 02Using 'match' with 'Option'ChallengeQuiz
- 03is_some() and is_none()ChallengeQuiz
- 04Unwrapping an 'Option'ChallengeQuiz
- 05The expectChallengeQuiz
- 06Providing a Default: unwrap_orChallengeQuiz
- 07Recap - Find an ElementChallenge
Handling Errors with 'Result'
7 lessons648- 01What is a 'Result'?Quiz
- 02Using 'match' with 'Result'ChallengeQuiz
- 03is_ok() and is_err()ChallengeQuiz
- 04Shortcuts: unwrap and expectChallengeQuiz
- 05The Question Mark Operator '?'ChallengeQuiz
- 06Parsing Strings to NumbersChallengeQuiz
- 07Recap - Safe Division FunctionChallenge
Project: Simple Item Inventory
5 lessons5- 01Project SetupChallenge
- 02Adding an ItemChallenge
- 03Checking StockChallenge
- 04Selling an ItemChallenge
- 05Putting it all togetherChallenge
String Slices and More
5 lessons432- 01String vs. &strQuiz
- 02Creating String SlicesChallengeQuiz
- 03Slices as Function ParametersChallengeQuiz
- 04Other SlicesChallengeQuiz
- 05Recap - Find First WordChallenge
Closures & Anonymous Functions
5 lessons431- 01What is a Closure?Quiz
- 02Defining a Simple ClosureChallengeQuiz
- 03Closures with ParametersChallengeQuiz
- 04Capturing the EnvironmentChallengeQuiz
- 05Recap - Simple Adder ClosureChallenge
Final Challenges
3 lessons3- 01Recap - Unique ItemsChallenge
- 02Recap - User Profile ValidatorChallenge
- 03Recap - Grade SummarizerChallenge
Section 3
Object Oriented Programming
Start sectionStartExpandCollapseDiscover how to organize code with classes, objects, and reusable structuresMethods and Behavior
7 lessons748- 01Intro Implementation BlocksChallengeQuiz
- 02The Self ParameterChallengeQuiz
- 03Mutable MethodsChallengeQuiz
- 04Associated FunctionsChallengeQuiz
- 05Multiple Implementation BlocksChallengeQuiz
- 06Method ChainingChallengeQuiz
- 07Recap - Rectangle ActionsChallenge
Encapsulation and Modules
6 lessons543- 01Modules BasicsQuiz
- 02The Public KeywordChallengeQuiz
- 03Private FieldsChallengeQuiz
- 04GettersChallengeQuiz
- 05SettersChallengeQuiz
- 06Recap - Secure LockerChallenge
Advanced Enums
5 lessons535- 01Enums with DataChallengeQuiz
- 02Methods on EnumsChallengeQuiz
- 03Matching Data VariantsChallengeQuiz
- 04The Option Enum RevisitedChallengeQuiz
- 05Recap - Shape EnumChallenge
Project: Virtual Pet
Project5 lessons1- 01Defining the PetChallenge
- 02Feeding the PetProject
- 03Playing with the PetProject
- 04Status ReportProject
- 05Final InteractionProject
Generics
5 lessons533- 01Generic StructsChallengeQuiz
- 02Generic MethodsChallengeQuiz
- 03Multiple Generic TypesChallengeQuiz
- 04Generic FunctionsChallengeQuiz
- 05Recap - Coordinate PointChallenge
Traits Definition
6 lessons641- 01What is a Trait?ChallengeQuiz
- 02Implementing TraitsChallengeQuiz
- 03Default ImplementationsChallengeQuiz
- 04Overriding DefaultsChallengeQuiz
- 05Traits with ParametersChallengeQuiz
- 06Recap - Media PlayerChallenge
Standard Traits
5 lessons536- 01The Debug TraitChallengeQuiz
- 02The Display TraitChallengeQuiz
- 03Clone and CopyChallengeQuiz
- 04Equality TraitsChallengeQuiz
- 05Recap - Printable PointChallenge
Traits as Bounds
5 lessons534- 01Trait Bounds SyntaxChallengeQuiz
- 02Multiple BoundsChallengeQuiz
- 03The Where ClauseChallengeQuiz
- 04Returning Types with TraitsChallengeQuiz
- 05Recap - Generic PrinterChallenge
Trait Objects
4 lessons425- 01Dynamic DispatchChallengeQuiz
- 02Vectors of TraitsChallengeQuiz
- 03Iterating Trait ObjectsChallengeQuiz
- 04Recap - Zoo ManagerChallenge
Project: Document System
Project5 lessons1- 01The Draw TraitChallenge
- 02Text ComponentProject
- 03Button ComponentProject
- 04The Screen StructProject
- 05Running the ScreenProject
Design Patterns in Rust
5 lessons531- 01Newtype PatternChallengeQuiz
- 02CompositionChallengeQuiz
- 03The Drop TraitChallengeQuiz
- 04From and IntoChallengeQuiz
- 05Recap - Smart Pointer MockChallenge
Final Challenges
3 lessons3- 01Generic StackChallenge
- 02Library CatalogChallenge
- 03Shape Area CalculatorChallenge
Rust courses
Hands-on Rust courses, free to start in your browser.
Beginner Challenges - Practice Basic Concepts
PopularPut your beginner coding knowledge to test and try to solve this programming challenges, use any language you want, Happy Coding!
Certificate on completion
- 20
- 20
Coding Problems
PopularPut your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language.
Certificate on completion
- 32
- 31
Coding Problems: Volume 2
Put your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language. This course is an extension of the first Coding Problems
Certificate on completion
- 25
- 24
Stack - Data Structures Series #1
In this course, you will learn about the Stack data structure, create a Stack from zero using your preferred language, and practice coding challenges with it!
- 13
- 6
- 1
Star Pattern Bootcamp
Put your programming problem solving skills to learn how to print star patterns range from simple to complex, involving different levels of nested loops, conditional statements, and mathematical calculations.
- 30
- 28
User Class - OOP Project
In this project, you will create a User Class and practice your object oriented programming skills in a programming language of your choice!
- 8
- 1
- 2
Why learn Rust with Coddy
- Write and run real Rust code in your browser. No rustup install, no Cargo setup. Each lesson compiles your Rust program server-side and shows the output (and any compiler errors) instantly.
- What makes Rust unique: ownership, borrowing, lifetimes, traits, enums and pattern matching, error handling with
Result. The Rust foundations every systems programmer needs. - AI hints walk you through Rust's famously strict compiler errors, so the borrow checker becomes a teacher instead of a wall when you're getting started.
- Free Rust certificate when you finish the course. A credible signal for systems, infrastructure, blockchain, and embedded roles where Rust is increasingly the language of choice.