Skip to main content
eLearner.app

Interactive course

Rust Course

Learn the Rust programming language from scratch with detailed explanations, practical examples, and interactive exercises: from variables and primitive types to safe memory management with ownership, borrowing, structs, and methods.

Static verification via keywords + execution on the official Rust Playground (one click for copy code + open).

01 · Rust Fundamentals

2 lessons

The foundations of the language: variables, mutability, shadowing, and using primitive scalar and compound types.

  1. 1.1Variables and MutabilityUnderstand default immutability, the use of the mut keyword, and the power of shadowing in Rust.~10 min
  2. 1.2Primitive TypesPrimitive scalar data types (numerical, boolean, char) and compound types (tuples and fixed-size arrays).~10 min

02 · Control Flow

2 lessons

Making decisions via conditional expressions, iterating with loops, and leveraging the language's pattern matching.

  1. 2.1Conditionals and LoopsBranching with if/else (used as an expression) and iterating with loop, while, and for constructs.~12 min
  2. 2.2Pattern Matching, Option, and ResultUsing the match statement and the standard Option and Result enums for safe error handling.~15 min

03 · Ownership and Borrowing

2 lessons

The heart of Rust's memory management: ownership, stack vs heap, move vs copy, and the safe use of references.

  1. 3.1The Rules of OwnershipThe three key rules of memory management without a garbage collector, dynamic allocation, copy, and ownership transfers.~15 min
  2. 3.2References and BorrowingBorrowing data via shared (&) and mutable (&mut) references, and avoiding data races with compiler rules.~15 min

04 · Data Structures and Methods

2 lessons

Define and organize complex custom data types with structs and implement their behavior via impl blocks.

  1. 4.1Defining and Instantiating StructsCustom structured data types in Rust: classic structs, tuple structs, and instantiation.~12 min
  2. 4.2Methods and impl BlocksAssociate functions and methods with a struct using impl, and understand the differences between self, &self, and &mut self.~12 min

05 · Generics and Traits

2 lessons

Develop flexible and reusable code using generic types and define shared behavior using Traits.

  1. 5.1Generics and FunctionsGeneric types syntax in functions and data structures to avoid code duplication.~12 min
  2. 5.2Traits and Trait BoundsDefine common interfaces with Traits and constrain generic types using the Trait Bound clause.~15 min

06 · Lifetimes and Smart Pointers

2 lessons

Manage reference lifetimes with lifetimes and analyze heap memory management via Box, Rc, and Arc.

  1. 6.1Lifetimes and ReferencesUnderstand the role of the Borrow Checker and specify explicit lifetime annotations when necessary.~15 min
  2. 6.2Smart Pointers: Box and RcDynamic heap allocation via Box and reference-counted multi-ownership pointers using Rc and Arc.~15 min

07 · Error Handling and Collections

2 lessons

Manipulate dynamic collections like HashMap and handle exceptions/errors in an advanced and idiomatic way.

  1. 7.1Collections and HashMapUse and manipulate dynamic vectors (Vec) and key-value dictionaries (HashMap) to collect data.~12 min
  2. 7.2Error Handling and the ? OperatorPropagate errors cleanly and linearly using the ? operator and implement custom error types.~15 min