Back to Tracks

Rust Fundamentals

Master the basics of Rust programming language, from syntax to ownership concepts.

Printing Hello World

BEGINNER

Create a function that prints 'Hello, world!' to the console using Rust.

Declaring Variables

BEGINNER

Learn to declare immutable variables in Rust and understand their usage.

Mutable Variables

BEGINNER

Define and modify mutable variables in Rust.

Constants

BEGINNER

Learn how to define and use constants in Rust.

Primitive Data Types

BEGINNER

Get familiar with primitive data types in Rust by defining and annotating variables.

Converting Numerical Types

BEGINNER

Implement a function to convert numerical types using the `as` keyword in Rust.

Mathematical operations

BEGINNER

Practice mathematical operations in Rust, including addition, subtraction, multiplication, and division.

Sum of Array

BEGINNER

Calculate the sum of all elements in an array.

Tuples

BEGINNER

Create a function that returns a tuple of values.

The Unit Type

BEGINNER

Understand and use the unit type `()` in Rust.

Functions

BEGINNER

Implement and work with functions in Rust.

Control Flow

BEGINNER

Implement basic control flow in Rust using if-else statements.

Ownership

EASY

Understand and implement Rust's ownership model.

Mutable References

BEGINNER

Implement Rust's ownership model with mutable references.

Ownership Rules

EASY

Identify and fix ownership rule violations in Rust code.

Character counting string

BEGINNER

Write a program that takes a string as input and counts the number of characters in the string.

Slices

EASY

Find the largest element in a slice of integers.

Mutable Slices

EASY

Manipulate elements in a mutable slice in-place using iteration.

Slice Manipulation

MEDIUM

Practice updating specific elements of a mutable slice in Rust.

Structs

EASY

Learn how to define and use structs in Rust.

Tuple Structs

EASY

Learn to define and use tuple structs in Rust.

Constructors

EASY

Learn to create constructors for Rust structs.

Unit Structs

EASY

Learn about unit structs and their use cases in Rust.

Methods on Structs

EASY

Learn how to define and use methods on Rust structs.

Animal sanctuary registry

MEDIUM

Create a program that manages a registry of animals in a sanctuary.

Implementing Debug Trait for Structs

EASY

Learn to use Rust's `derive` attribute to implement the `Debug` trait for custom structs.

Enums

EASY

Learn how to use enums in Rust by implementing a basic TrafficLight enum.

Playing Cards

EASY

Learn how to use enums with unit and tuple variants by implementing a Card enum.

Complex Enums

MEDIUM

Explore complex enums by combining unit, tuple, and named field variants in Rust.

Methods on Enums

MEDIUM

Learn how to define and use methods on Rust enums.

Deriving PartialEq

EASY

Learn how to use the derive macro to implement PartialEq for an enum.

If Let Enums

EASY

Practice pattern matching on enums using `if let`.

Vectors

EASY

Perform basic operations on vectors in Rust.

Hashmaps

EASY

Use Rust's HashMap to create a simple key-value store.

Student Grades Tracker

MEDIUM

Manage student grades using structs and hashmaps without error handling.

Student Grades Tracker 2

MEDIUM

Extend the student grades system with methods inside the Student struct.

Using Option<T> for Optional Values

EASY

Implement functions that work with optional values using Option<T>.

Graceful error handling

EASY

Implement graceful error handling in Rust using the Result type.

Graceful error handling 2

MEDIUM

Enhance error handling by defining custom error types and implementing the `Error` trait.

Error Propagation in File Handling

EASY

Learn how to propagate errors while reading integers from a file in Rust.

Option Propagation in Rust

EASY

Learn how to propagate `Option` values in a clean and idiomatic way.

Result to Option

EASY

Learn how to handle `Result` from an I/O operation and convert it to `Option`.

Option to Result

EASY

Learn how to convert an `Option<T>` to a `Result<T, E>` in Rust.

Panic

MEDIUM

Learn to handle unrecoverable errors in Rust using `panic!`.

unwrap and expect

MEDIUM

Learn to handle unrecoverable errors in Rust using `unwrap` and `expect` with function calls.

Traits

EASY

Implement and use traits to define shared behavior in Rust.

Generics

EASY

Use generics with traits to create reusable and flexible code.

Trait Bounds

EASY

Use trait bounds to constrain generic types in Rust.

The AsRef Trait

MEDIUM

Implement a function that uses the AsRef trait to work seamlessly with borrowed string types.

The From trait

MEDIUM

Implement the From trait for a custom type.

Returning impl Trait

EASY

Use `impl Trait` syntax to return an iterator that filters strings starting with a keyword.

Return Trait Objects

MEDIUM

Learn to create and return trait objects in Rust using Box<dyn Trait>.

Trait Objects

MEDIUM

Learn how to use trait objects as fields in structs for dynamic behavior in Rust.

Associated types

MEDIUM

Implement a trait with associated types in Rust.

Supertraits

MEDIUM

Implement a trait that requires another trait in Rust.

Plugin System

HARD

Design a plugin system using Rust's trait objects.

Lifetimes

MEDIUM

Understand and implement lifetimes in Rust to ensure memory safety.

Structs and references

MEDIUM

Create a struct that holds a reference and performs keyword searches in a string slice.

Mutable Struct References

MEDIUM

Implement a struct that holds a mutable reference to a String and modifies its content.

Closures

BEGINNER

Learn how to define and use closures in Rust.

Closure Types

MEDIUM

Understand and define closure types in Rust with practical examples.

Iterators

MEDIUM

Learn to work with Rust iterators by implementing filtering and transformation operations.

Unique Items

MEDIUM

Use Rust iterators to filter and collect unique items from a collection.

Box<T>

EASY

Understand and use Box<T> to allocate values on the heap.

The Drop Trait

MEDIUM

Implement custom behavior for a struct when it goes out of scope using the Drop trait.

Rc<T>

MEDIUM

Explore reference-counted smart pointers in Rust using Rc<T> to share data.

Interior Mutability

MEDIUM

Understand and utilize interior mutability in Rust using Rc and RefCell.

Concurrency

MEDIUM

Use threads to mutate a shared vector with non-deterministic ordering.

Channels

MEDIUM

Learn how to communicate between threads using Rust's mpsc channels.

Shared State Concurrency

MEDIUM

Implement and manage shared state in concurrent programming using threads and Mutex in Rust.

Advanced Match Patterns

HARD

Utilize Rust's advanced pattern matching capabilities to destructure complex data.

Advanced Traits

MEDIUM

Implement and use advanced trait functionalities in Rust.

Macros

EASY

Create a basic macro in Rust to demonstrate its functionality.

Macros 2

MEDIUM

Create a macro to implement a trait for generating default values for various types.

The Default Trait

EASY

Implement and use the Default trait for custom types in Rust.

Procedural macros

HARD

Implement a simple procedural macro to automatically derive a custom trait.