Rust Roadmap

This Rust Roadmap is a free, full-text syllabus of 122 lessons in 23 stages, starting with Introduction and ending with Debugging. It suits anyone who wants to learn Rust, whether new to it or filling gaps. There is no fixed length: every lesson is open from the start, so you go at your own pace and skip what you already know.

Last updated

Getting Started0%
Halfway
Almost There
Complete

Reading is open to everyone. Sign in to join this roadmap and track what you finish.

Continue learning

1. IntroductionIntroduction

0%

Introduction

3 topics · 0 completed

0%

The last 2 topics are drawn beside this stage on the original roadmap. Which stage they belong to is not recorded, so they are listed here rather than filed under one.

Full syllabus: every lesson in the Rust roadmap

23 stages and 122 lessons, in the order the roadmap suggests. Every lesson is free to read and open from the start.

  1. Stage 1: Introduction

    • Introduction

      Rust is a modern system programming language focused on performance, safety, and concurrency. It accomplishes these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren’t good at. Its syntax is similar to C++, but Rust offers better memory safety while…

    • What is Rust?

      Rust is a modern system programming language focused on performance, safety, and concurrency. It accomplishes these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren’t good at. Its syntax is similar to C++, but Rust offers better memory safety while…

    • Why use Rust?

      Rust is a system programming language that aims to provide memory safety, concurrency, and performance with a focus on zero cost abstractions. It was originally created by Graydon Hoare at Mozilla Research, with contributions from Brendan Eich, the creator of JavaScript. Rust is appreciated for the solutions it…

  2. Stage 2: Language Basics

    • Language Basics

      Rust language basics cover fundamental programming concepts including syntax and semantics, variables and data types, control flow (loops and conditionals), and functions. These elements form the foundation for writing effective Rust code and understanding how to structure and reuse code segments.

    • Variables, DataTypes and Constants

      In Rust, variables are declared using the let keyword. All variables are immutable by default, which means once a value is bound to a variable, it cannot be changed. If you want to make a variable mutable, the mut keyword is used. So, if you wanted to declare a mutable variable x and assign it the value 5, you…

    • Control Flow and Constructs

      In Rust, control flow is managed through various structures, like if, else, while, for, loop, match and if let. The if and else structures are used to execute different blocks of code based on certain conditions. Similar to other languages, while and for are used for looping over a block of code. The while loop…

    • Functions and Method Syntax

      In Rust, functions are declared using the fn keyword. Each function can take a set of input variables with their specified types, and may return data of a specified type. The body of a function is contained within curly braces {}. Unlike other languages, in Rust, you don't need to end the last statement in a block…

    • Pattern Matching & Destructuring

      In Rust, "pattern matching" is a robust tool that allows you to destructure data types and perform conditional checks in a succinct and clear way. The main structures used for pattern matching are match and if let. The match keyword can be used to compare a value against a series of patterns and then execute code…

    • Installing Rust and Cargo

      To install Rust, navigate to the rust official website and download the appropriate installation file (or run the appropriate terminal command) for your operating system. You'll be installing rustup, which is the preferred tool for installing, updating, and managing your core Rust tooling. For UNIX systems like…

    • IDEs and Rust Toolchains

      For the Rust Programming Language, several Integrated Development Environments (IDEs) and editors provide great support. Visual Studio Code is highly preferred among Rust developers due to its support for Rust via the "Rust Language Server" or "rust-analyzer" plugins. Another popular choice is RustRover, a…

    • Rust REPL (Rust Playground)

      Rust REPL (Read-Eval-Print-Loop) is an interactive shell in which you can write and test Rust snippets in real-time. Unlike running a program normally in Rust where you have to manually compile and then run the program, REPL automatically evaluates your inputs, and the result is returned immediately after…

  3. Stage 3: Error Handling

    • Error Handling

      Rust handles errors through Result<T, E for operations that may fail and Option<T for values that may be absent. Result has Ok(T) for success and Err(E) for errors, while Option has Some(T) and None. Pattern matching and the ? operator enable elegant error handling and propagation. Rust doesn't use exceptions,…

    • Option and Result Enumerations

      Option<T handles nullable values with Some(T) and None variants, replacing null pointers safely. Result<T, E manages error handling with Ok(T) for success and Err(E) for failures. Both enums enable safe error handling through pattern matching and method chaining.

    • Propagating Errors and `?` Operator

      The ? operator provides concise error propagation in functions returning Result or Option. It automatically unwraps Ok/Some values or early-returns Err/None to the caller. This eliminates verbose match expressions and enables clean, readable error handling patterns.

    • Custom Error Types and Traits

      Custom error types use enum to define specific error variants with attached data. Implement Debug, Display, and optionally std::error::Error traits for proper error handling integration. Libraries like thiserror provide derive macros to simplify custom error creation and formatting.

    • Enums

      An enum, short for enumeration, is a custom data type that allows you to define a type by enumerating (listing out one-by-one) all of its possible variants. In Rust, if something is one of a given set of possibilities (e.g., Rock or Paper or Scissors), it's probably appropriate to represent that data with an enum,…

    • Traits

      Traits in Rust define behaviors that are shared among different data types. Implementing traits for data types is a great way to group method signatures together and define a set of behaviors your types require. Essentially, anything with a certain trait applied to it will "inherit" the behavior of that trait's…

    • Structs

      In Rust, a struct is a custom data type used for grouping related values together into one entity. Structs are similar to classes in other programming languages. Essentially, each struct creates a new type that we can use to streamline complex data handling.

    • Impl Blocks

      Impl blocks use the impl keyword, and are used to implement behavior in the form of methods for a struct, enum, or trait. If you want your data type or trait to have methods, you need a corresponding impl block containing functions for the type or trait.

  4. Stage 4: Modules & Crates

    • Modules & Crates

      Modules provide namespacing and encapsulation within a crate, organizing code with mod keyword and controlling visibility with pub. Crates are compilation units (binaries or libraries) that can depend on other crates. The module system organizes code within crates, while crates enable sharing functionality between…

    • Code Organization & Namespacing

      Rust organizes code through modules (mod) for grouping related functionality and crates (binary/library projects). Modules provide namespacing and can be nested. Crates are compilation units with a root file (main.rs or lib.rs) forming the module tree for libraries or executables.

    • Dependency Management with Cargo

      Cargo manages Rust projects and dependencies through Cargo.toml files. Dependencies are listed in [dependencies] sections with crate names and semantic version specifications. Cargo automatically downloads, builds, and manages external libraries (crates) from crates.io or other sources.

    • Publishing on Crates.io

      Publishing Rust crates involves creating an account on crates.io, preparing proper Cargo.toml metadata, and using cargo publish. Once published, versions cannot be deleted or overwritten, ensuring dependency stability. The registry serves as Rust's central package repository for sharing libraries.

  5. Stage 5: Testing

    • Testing

      Rust has built-in testing support through cargo test and the [test] attribute. Test functions use assertion macros like assert!, asserteq!, and assertne! to verify expected behavior. Organize tests with unit tests, integration tests, and documentation tests for comprehensive coverage.

    • Integers

      In Rust, integers are a primitive data type that hold whole number values, both positive and negative. Integer types in Rust can be divided into signed and unsigned ones:

    • Floats

      In Rust, floats are a primitive data types used to represent floating-point numbers. They are defined as numerical values with fractional components. Floating-point numbers are represented according to the IEEE-754 standard.

    • Boolean

      Rust's bool primitive type represents truth values with two possible states: true or false. Booleans are used in conditional statements and logical operations like && (AND), || (OR), and ! (NOT). When cast to integers, true becomes 1 and false becomes 0. Example: let isactive: bool = true;

    • Character

      Rust's char type represents a Unicode Scalar Value, supporting far more than ASCII including emojis, accented letters, and various scripts. Each char occupies 4 bytes (32 bits) in memory and is defined using single quotes. Example: let letter: char = 'z'; or let emoji: char = '🦀';

    • String

      Rust's String is a growable, mutable, UTF-8 encoded string type stored on the heap. Unlike string slices (&str), String owns its data and can be modified. Create with String::from("text") or "text".tostring(). Common operations include pushstr(), push(), and concatenation with + or format!() macro.

    • Tuple

      Tuples are fixed-size collections that can hold elements of different types. Access elements using dot notation with zero-based indexing: tuple.0, tuple.1, etc. Example: let data: (i32, f64, char) = (42, 3.14, 'x');. Useful for grouping related values of different types and multiple variable assignments.

    • Array

      Arrays are fixed-size collections of elements of the same type stored consecutively in memory. Size must be known at compile time and cannot change. Syntax: let arr: [type; size] = [elements];. Example: let nums: [i32; 3] = [1, 2, 3];. Access elements with zero-based indexing: arr[0].

    • Vector

      Vec<T is Rust's growable, heap-allocated array that stores elements of the same type contiguously. Unlike arrays, vectors can resize at runtime. Key methods include push() to add elements, pop() to remove the last element, and len() for size. Example: let mut v = vec![1, 2, 3];

    • Hashmap

      HashMap<K, V stores key-value pairs using hashing for fast lookups, insertions, and removals. Keys must be unique; duplicate keys replace old values. Rust uses cryptographically strong hashing for security. Items are unordered. Example: HashMap::new() or HashMap::from([("key", "value")]).

    • Hashset

      HashSet<T is a collection of unique elements using hash-based storage for fast lookups, insertions, and deletions. No duplicates are allowed and elements are unordered. Provides methods like insert(), contains(), and remove(). Example: let mut set = HashSet::new(); set.insert("value");

    • LinkedList

      LinkedList<T is a doubly-linked list where each node contains a value and pointers to both next and previous nodes. Provides O(1) insertion/removal at both ends but O(n) indexing. Generally slower than Vec and rarely needed; VecDeque is usually preferred for queue operations.

    • Stack

      Stack is a LIFO (Last-In-First-Out) data structure where elements are added and removed from the same end. In Rust, the call stack manages function calls, with each call pushing a frame and returns popping it. Stack memory is fast but limited in size, with stack overflow occurring when exceeded.

    • Queue

      Queue follows FIFO (First-In-First-Out) ordering where elements are added at one end and removed from the other. Rust doesn't have a built-in queue, but VecDeque provides queue functionality with pushback() for adding and popfront() for removing elements efficiently.

    • Binary Heap

      BinaryHeap<T is a priority queue implemented as a max-heap using a binary tree structure stored in an array. The largest element is always at the root, accessible via peek(). Supports O(log n) insertion with push() and removal with pop(). Useful for priority-based algorithms.

  6. Stage 6: Concurrency & Parallelism

    • Concurrency & Parallelism

      Concurrency allows tasks to run in overlapping time periods (interleaved execution), while parallelism executes multiple tasks simultaneously on different cores. Rust provides safe concurrency primitives like channels, mutexes, and atomic operations without data races, enforced at compile time.

    • Ownsership Rules & Memory Safety

      Rust's ownership has three key rules: each value has exactly one owner, only one owner exists at a time, and values are dropped when owners go out of scope. This prevents data races, ensures memory safety without garbage collection, and eliminates common bugs like use-after-free and memory leaks.

    • Borrowing, References and Slices

      Borrowing allows accessing data without taking ownership. Immutable borrows (&T) permit multiple read-only references, while mutable borrows (&mut T) allow one exclusive reference that can modify data. Slices (&[T], &str) are references to contiguous sequences, enabling safe access to portions of data.

    • Deep Dive: Stack vs Heap

      Stack memory stores fixed-size data with automatic allocation/deallocation following LIFO order - fast but limited. Heap memory stores dynamic-size data with manual management - slower but flexible. Rust's ownership system ensures memory safety across both, with stack being default and heap accessed via smart pointers.

    • Unit & Integration Testing

      Unit tests verify individual functions using [test] and live alongside code. Integration tests are in separate files/directories and test component interactions. Rust provides cargo test to run both types, supporting test organization for comprehensive code verification and quality assurance.

    • Mocking & Property Based Testing

      Mocking creates fake functions/objects for testing different scenarios. Rust uses external libraries like mockito, mockall, and mockalldouble for mocking capabilities. Property-based testing generates test cases automatically to verify code behavior across a wide range of inputs.

  7. Stage 7: Traits & Generics

    • Traits & Generics

      Traits define shared behavior that types can implement, while generics enable code reuse with type parameters. Together, they provide trait bounds (T: Display) to constrain generic types, ensuring they have required functionality. This enables safe, zero-cost polymorphism and code abstraction.

    • Trait Definitions & Implementations

      Traits define shared behavior as a set of method signatures that types can implement. Define with trait Name { fn method(&self); } and implement with impl TraitName for Type. Traits enable polymorphism, code reuse, and abstraction while maintaining type safety and zero-cost performance.

    • Trait Bounds and Associated Types

      Trait bounds constrain generics by requiring types to implement specific traits (T: Display). Associated types define type placeholders within traits that implementors must specify. Together, they enable flexible generic programming with type safety and improved API design patterns.

    • Generics & Type-Level Programming

      Advanced generics in Rust include where clauses for complex bounds, ?Sized for unsized types, associated types, and higher-kinded types. These enable sophisticated type-level programming, allowing precise control over generic constraints and enabling powerful abstractions while maintaining zero-cost performance.

    • BTreeMap

      BTreeMap<K, V stores key-value pairs in a sorted binary tree structure. Keys must implement Ord trait and are automatically kept in sorted order. Provides O(log n) operations for insertion, removal, and lookup. Ideal when you need ordered iteration and range queries.

    • BTreeSet

      BTreeSet<T is a sorted set of unique elements implemented using a B-tree. Elements must implement Ord trait and are kept in sorted order. Provides O(log n) insertion, removal, and lookup operations. Supports efficient range queries and set operations like union and intersection.

    • Mutex

      Mutex<T (Mutual Exclusion) protects shared data from concurrent access by multiple threads. Only one thread can access the protected data at a time through lock(). Rust automatically unlocks mutexes when they go out of scope and handles panics to prevent deadlocks.

    • RwLock

      RwLock<T (Read-Write Lock) allows multiple concurrent readers OR one exclusive writer, unlike Mutex which allows only one accessor. Use read() for shared access and write() for exclusive access. Ideal for read-heavy workloads where data is frequently read but rarely modified.

    • Channels

      Channels enable thread communication via message passing from std::sync::mpsc (Multiple Producer, Single Consumer). They have Sender for sending data and Receiver for receiving. This avoids shared state concurrency issues and enables safe communication between threads without data races.

    • RC

      Rc<T (Reference Counting) enables multiple owners of the same heap-allocated data in single-threaded contexts. It tracks the number of references and automatically deallocates data when the count reaches zero. Use Rc::clone() to create additional references without deep copying data.

    • Arc

      Arc<T (Atomic Reference Counting) is a thread-safe smart pointer for sharing immutable data across multiple threads. It uses atomic operations to track reference counts, allowing multiple ownership of heap-allocated data. When the reference count reaches zero, the data is automatically cleaned up.

    • Box

      A Box in Rust is a smart pointer that allocates memory on the heap. It's primarily used to store data that has a size that's not known at compile time, or when you want to transfer ownership of data without copying it. Think of it as a way to put data on the heap and access it through a pointer, ensuring that the…

    • Threads, Channels and Message Passing

      Rust provides native threading with std::thread::spawn() and join() for 1:1 OS thread mapping. Channels enable safe message passing between threads, avoiding shared state issues. This model promotes concurrent programming without data races through Rust's ownership system.

    • Atomic Operations & Memory Barriers

      Atomic operations provide lock-free concurrency through uninterruptible operations like load, store, swap, and compareandswap. These low-level primitives enable thread-safe data sharing without locks, forming the foundation for higher-level concurrent abstractions and non-blocking data structures.

    • Futures and Async/Await Paradigm

      Futures represent asynchronous computations that produce values or errors eventually. The async/await syntax provides ergonomic programming over futures, allowing asynchronous code to look synchronous. Futures are lazy and must be polled to make progress, forming the foundation of Rust's async ecosystem.

  8. Stage 8: Lifetimes & Borrow Checker

    • Lifetimes & Borrow Checker

      Lifetimes define how long references remain valid, preventing dangling references and memory safety issues. The borrow checker enforces these rules at compile time. Lifetime annotations use syntax like 'a to specify relationships between references in function signatures when the compiler can't infer them…

  9. Stage 9: Macros & Metaprogramming

    • Macros & Metaprogramming

      Macros are code that writes code, enabling metaprogramming in Rust. Declarative macros use macrorules! for pattern-based code generation, while procedural macros provide custom derives and function-like macros. They're expanded at compile time, offering zero-cost abstractions.

    • Declarative Macros with macro_rules!

      Declarative macros use macrorules! for pattern-based code generation at compile time. They match syntax patterns and expand into replacement code, enabling code reuse without runtime overhead. More limited than procedural macros but simpler to write and understand.

    • Procedural Macros & Custom Derive

      Procedural macros operate on token streams at compile time, generating new code. Three types exist: custom derive (for [derive(MyTrait)]), attribute-like ([myattr]), and function-like (mymacro!()). More powerful than declarative macros but require separate crates with special configuration.

    • Domain Specific Languages (DSLs)

      DSLs are specialized programming languages for specific domains. Rust macros enable creating DSLs by manipulating syntax trees and defining custom syntax patterns. This allows extending Rust's language capabilities for specialized applications like game development, configuration, or domain-specific tasks.

  10. Stage 10: Web Development

    • Web Development

      Rust offers excellent web development capabilities with frameworks like Actix, Rocket, Axum, and Warp. These provide HTTP handling, routing, middleware, and database integration. Rust's performance and safety make it ideal for high-performance web services, APIs, and microservices.

    • Axum

      Axum is a modern, ergonomic web framework built on hyper and designed for async Rust. It features excellent type safety, powerful extractors, middleware support, and seamless Tokio integration. Axum emphasizes developer experience while maintaining high performance for web services and APIs.

    • Actix

      Actix is a high-performance, pragmatic web framework for Rust built on the actor model. It features powerful middleware, WebSocket support, and excellent performance benchmarks. Actix provides a flexible, feature-rich API for building web applications, APIs, and microservices with minimal boilerplate.

    • Leptos

      Leptos is a rust based web framework that lets you build reactive UIs with Rust and WebAssembly. It supports SSR and CSR, fine-grained reactivity, and a rich ecosystem of libraries and tools. Leptos lets you build web applications with client-side rendering, server-side rendering, or hydration.

    • Loco

      Loco is a web framework for Rust that is inspired by Ruby on Rails, designed to help developers build MVC-style applications easily. It emphasizes simplicity, rapid development, and integrates features like ORM, background jobs, and templating engines for a productive coding experience.

    • Rocket

      Rocket is a web framework for Rust emphasizing ease of use, expressiveness, and type safety. It features code generation via procedural macros, built-in templating, request guards, and comprehensive error handling. Rocket prioritizes developer productivity with intuitive APIs and detailed error messages.

    • Explicit Lifetime Annotations

      Explicit lifetime annotations use syntax like 'a to specify relationships between reference lifetimes in function signatures. Required when the compiler can't infer lifetimes automatically. Example: fn longest<'a(x: &'a str, y: &'a str) - &'a str ensures all references live equally long.

    • Lifetime Elision Rules

      Lifetime elision allows the compiler to infer lifetimes in common patterns, reducing explicit annotations. Rules: each reference parameter gets its own lifetime, single input lifetime applies to all outputs, methods with &self propagate its lifetime to outputs. Simplifies code while maintaining safety.

    • Covariant & Contravariant Lifetimes

      Variance describes how subtyping relationships change when types are nested. Covariant types preserve ordering (&'long T is subtype of &'short T), contravariant reverses it, invariant requires exact matches. Affects how lifetimes work with references, boxes, and function parameters.

  11. Stage 11: Asynchronous Programming

    • Asynchronous Programming

      Async programming in Rust allows executing tasks concurrently rather than sequentially, enabling efficient resource usage especially in IO-heavy applications. Rust provides async and await keywords: async marks functions that can return Future values, while await pauses and resumes async functions. Popular async…

    • Serde

      Serde is Rust's most popular serialization framework for converting data structures to/from formats like JSON, YAML, TOML, and Binary. It provides Serialize and Deserialize traits with derive macros for automatic implementation. Offers high performance with customizable behavior for complex use cases.

    • json-rust

      JSON handling in Rust primarily uses serde and serdejson libraries for high-performance serialization/deserialization. These provide seamless conversion between Rust data structures and JSON, with parsing from strings/files, serialization to JSON, and direct manipulation of JSON values.

    • toml-rust

      toml-rs parses and serializes TOML (Tom's Obvious, Minimal Language) configuration files in Rust. Uses serde for automatic serialization/deserialization between TOML and Rust types. Leverages Rust's trait system and type inference to convert TOML documents into statically-typed Rust structures.

  12. Stage 12: Networking

    • Networking

      Rust's std::net module provides networking primitives including TcpStream, TcpListener, UdpSocket, and address types. Built on BSD sockets, it offers low-level network operations for building networking applications. Higher-level crates like Tokio provide async networking capabilities.

  13. Stage 13: Serialization / Deserialization

    • Serialization / Deserialization

      Serialization converts Rust data structures into bytes for storage or transmission, while deserialization reverses the process. Serde is the standard framework with support for JSON, YAML, TOML, Binary, and more formats. Provides efficient, type-safe data conversion.

  14. Stage 14: Cryptography

    • Cryptography

      Cryptography involves securing data through encryption (making readable data unreadable) and decryption (reversing the process). Rust offers crypto libraries like ring, sodiumoxide, and rust-crypto for hashing, symmetric/asymmetric encryption, and digital signatures with memory-safe implementations.

    • Tokio

      Tokio is Rust's most popular async runtime for building fast, reliable network applications. It provides an async/await runtime, I/O drivers, timers, and networking primitives. Tokio enables high-performance concurrent applications by efficiently managing thousands of tasks on a small number of threads.

    • async-std

      async-std provides an asynchronous version of Rust's standard library, offering familiar APIs for async programming. It includes its own runtime, task scheduler, and async I/O primitives, designed as a drop-in replacement for std with async capabilities and intuitive syntax.

    • smol

      smol is a small, fast async runtime for Rust with minimal API and clean design. Built on async-std and Tokio, it supports async/await natively with efficient scheduling. Offers essential async functionality including timers, futures, and task management with superior performance in a lightweight package.

    • reqwest

      reqwest is a popular HTTP client library for Rust that provides both sync and async APIs for making HTTP requests. Built on hyper and tokio, it supports JSON, forms, cookies, and various authentication methods with an ergonomic, easy-to-use interface for web API interactions.

    • hyper

      Hyper is a fast, safe HTTP client/server library for Rust built on Tokio for async I/O. It supports HTTP/1 and HTTP/2 with automatic protocol negotiation. Hyper provides low-level HTTP primitives that power many higher-level web frameworks and serves as the foundation for efficient network programming.

    • quinn

      Quinn is a high-performance QUIC protocol implementation for Rust built on Tokio. QUIC is a modern transport protocol offering better performance than TCP with multiplexing and security. Quinn provides async, futures-based API supporting both client and server roles for networking applications.

  15. Stage 15: Database and ORM

    • Database and ORM

      ORMs (Object-Relational Mapping) provide abstraction layers between Rust code and SQL databases. Popular Rust ORMs include Diesel (compile-time safety), SQLx (async with compile-time query checking), and Sea-ORM. They eliminate raw SQL writing while maintaining type safety and performance.

  16. Stage 16: CLI Utilities

    • CLI Utilities

      CLI utilities are command-line tools that allow users to interact with their system through text commands. Rust is excellent for building fast, reliable CLI tools due to its memory safety and performance. Popular crates like clap and structopt help parse command-line arguments, handle input validation, and generate…

    • Diesel

      Diesel is a safe, extensible ORM and query builder for Rust that provides compile-time guarantees against SQL injection and type mismatches. It supports PostgreSQL, MySQL, and SQLite with high-level APIs for database operations while maintaining excellent performance and type safety.

    • sqlx

      SQLx is an async, pure-Rust SQL toolkit providing compile-time query checking for PostgreSQL, MySQL, SQLite, and MSSQL. It features macro-based query validation, strong typing, and compatibility with Tokio/async-std runtimes. SQLx eliminates runtime SQL errors through compile-time verification.

    • rusqlite

      rusqlite is an ergonomic SQLite library for Rust built around the sqlite3 C library. It provides simple, efficient database operations with minimal SQL knowledge required. Features seamless serde integration for type-safe bidirectional mapping between SQL and Rust data structures.

    • termion

      termion is a pure Rust, zero-dependency library for low-level terminal manipulation and information handling. Provides cross-terminal compatibility with features like color support, input handling, and terminal-specific capabilities. Ideal for building cross-platform CLI applications without external bindings.

    • structopt

      StructOpt is a library for parsing command-line arguments by defining structs where fields represent flags, options, and arguments. Combines clap's parsing power with Rust's type system for declarative CLI definition with automatic help generation, strong typing, and validation.

    • ring

      ring is a safe, fast cryptography library for Rust focused on TLS and core cryptographic primitives. It includes RSA, AES, SHA, and other algorithms with compile-time and runtime safety checks. Restricts usage to safe, reviewed algorithms to prevent common cryptographic pitfalls and insecure implementations.

    • rust-crypto

      rust-crypto is a collection of cryptographic algorithms implemented in pure Rust including AES, DES ciphers, SHA, MD5 hash functions, and RSA digital signatures. Known for speed and low memory usage, making it suitable for resource-constrained systems requiring cryptographic functionality.

    • sodiumoxide

      sodiumoxide is a Rust binding to libsodium cryptography library, designed for easy use and misuse prevention. Provides safe, high-level, idiomatic Rust wrappers for cryptographic primitives with automatic error handling. Follows NaCl design principles for simplicity while offering libsodium performance benefits.

    • clap

      clap is Rust's most popular command-line argument parser library. It provides declarative CLI definition with automatic help generation, subcommands, validation, and error handling. Supports both builder pattern and derive macros for easy CLI app development with comprehensive features.

  17. Stage 17: Game Development

    • Game Development

      Rust's performance and memory safety make it excellent for game development. Popular engines and frameworks include Bevy (ECS-based), Macroquad, ggez, and Fyrox. Rust handles both 2D and 3D games efficiently, with growing ecosystem support for graphics, audio, and physics.

    • embedded-hal

      embedded-hal (Hardware Abstraction Layer) provides generic traits for creating portable embedded drivers in Rust. Enables hardware-agnostic code by abstracting digital I/O, UART, I2C, SPI, and other communication protocols into a uniform API, promoting code reuse across different hardware platforms.

    • rppal

      RPPAL (Raspberry Pi Peripheral Access Library) provides Rust access to Raspberry Pi GPIO, I2C, PWM, SPI, and UART peripherals. Features comprehensive interrupt handling, software-based PWM, and I2C/SPI buses. Supports all Raspberry Pi models running Raspbian/Debian Stretch or newer.

    • nrf-hal

      nrf-hal is a Rust Peripheral Access Crate for Nordic Semiconductor nRF52 and nRF91 series chips. Provides high-level, semantic interfaces for GPIO, timers, RNG, RTC, I2C/SPI, temperature sensors, and delay routines. Open-source Apache licensed library abstracting direct register access.

    • tauri

      Tauri is a framework for building lightweight, secure desktop applications using web technologies (HTML, CSS, JS) with a Rust backend. It offers smaller bundle sizes than Electron, enhanced security, and cross-platform support for Windows, macOS, and Linux with native system integration.

    • gtk-rs

      gtk-rs provides Rust bindings for GTK+3 and related libraries (GObject, Glib, Cairo, Pango) enabling cross-platform GUI application development. These open-source libraries offer a Rust-friendly interface for GTK components, allowing developers to create graphical applications using Rust with native GTK functionality.

    • Iced

      Iced is a cross-platform GUI library for Rust that focuses on simplicity and type safety. Inspired by the Elm architecture, it uses a functional approach where the application state is updated through messages, making it easy to create reactive and predictable user interfaces. It provides a modular design that…

    • GPUI

      GPUI is a high-performance, native GUI framework written in Rust, designed to enable the creation of responsive and visually appealing desktop applications. It uses a retained-mode rendering approach, where the framework manages and optimizes the drawing of UI elements based on their state, allowing for smooth…

  18. Stage 18: GUI Development

    • GUI Development

      Rust offers several GUI frameworks for desktop applications including Tauri (web-based), Iced (inspired by Elm), Druid, GTK-rs, and Egui. These provide cross-platform support for creating native desktop applications with modern UI patterns and performance benefits of Rust.

  19. Stage 19: Embedded and Systems

    • Embedded and Systems

      Rust excels in embedded systems programming for microcontrollers and real-time applications. Its zero-cost abstractions, memory safety, and low-level control make it ideal for resource-constrained environments. Popular for IoT devices, firmware, and system-level programming without garbage collection overhead.

  20. Stage 20: WebAssembly (WASM)

    • WebAssembly (WASM)

      WebAssembly is a binary instruction format that runs at near-native speed in web browsers and other environments. Rust compiles excellently to WASM with tools like wasm-pack and wasm-bindgen, enabling high-performance web applications and cross-platform deployment.

    • wasm-pack

      wasm-pack is a command-line tool for assembling and packaging Rust crates targeting WebAssembly. It bridges Rust/WASM and JavaScript, generating necessary files for npm publishing. Ensures proper Rust-to-WASM compilation setup with focus on ergonomics, performance, and correctness.

    • wasmer

      Wasmer is a standalone WebAssembly runtime designed to run WASM files on any platform quickly and efficiently. Features a pluggable system with different compiling strategies, friendly CLI, and embedding APIs for calling WASM functions directly from various programming languages. Lightweight and modular.

    • wasm-bindgen

      wasm-bindgen facilitates high-level interactions between Rust and JavaScript in WebAssembly. It generates bindings allowing seamless communication, JavaScript API calls from Rust, and vice versa. Handles memory representations and call semantics for complex data types like strings and objects.

    • bevy

      Bevy is a modern, data-driven game engine built in Rust featuring an ECS (Entity Component System) architecture. It supports both 2D and 3D games with modular design, custom shaders, and high performance. Bevy emphasizes developer ergonomics and provides comprehensive tools for game development.

    • fyrox

      Fyrox is a modern, highly optimized 3D game engine designed specifically for Rust. Leverages Rust's safety and concurrency for high performance and reliability. Features advanced lighting, shadowing, support for common 3D formats, and low-level hardware control for performance-critical applications.

    • ggez

      ggez is a lightweight 2D game framework for Rust inspired by Love2D. Provides facilities for graphics rendering, input handling, audio manipulation, and game timing with an easy, Rusty interface. Enables developers to focus on game logic without worrying about low-level implementation details.

    • macroquad

      Macroquad is a simple, cross-platform 2D game engine for Rust focusing on rapid prototyping and development. Features efficient rendering via miniquad, input handling, coroutine-based async programming, and sound support. Portable across Windows, macOS, Linux, WebAssembly, Android, and iOS.

    • wgpu-rs

      wgpu-rs provides safe, idiomatic Rust graphics programming by abstracting over wgpu-core. Offers high-level convenience with low-level control options. Provides unified access to graphics and compute functionality across Vulkan, Metal, DirectX, and WebGPU backends for cross-platform compatibility.

  21. Stage 21: Performance and Profiling

    • Performance and Profiling

      Performance profiling in Rust identifies bottlenecks using tools like perf, cargo bench, criterion, and flamegraph. These tools collect statistical data about runtime performance, helping developers optimize code efficiently by targeting actual problem areas rather than guessing.

    • Criterion.rs

      Criterion.rs is a statistics-driven microbenchmarking library for Rust that provides reliable performance analysis over time. It offers detailed feedback, automatic outlier detection, and statistical methods to compare algorithm performance and track regressions with actionable insights.

  22. Stage 22: Documenting with `rustdoc`

    • Documenting with `rustdoc`

      RustDoc is an invaluable tool within the Rust ecosystem for generating comprehensive and user-friendly documentation directly from your source code. By leveraging special documentation comments (starting with /// for regular comments and //! for crate-level comments), developers can embed Markdown-formatted text,…

  23. Stage 23: Debugging

    • Debugging

      Rust provides excellent debugging support through rust-gdb and rust-lldb debuggers, along with built-in macros like println!, dbg!, and debug!. The strict compiler catches many bugs at compile-time, while runtime debugging is enhanced by panic backtraces and comprehensive error messages.

    • rust-gdb

      rust-gdb is GDB (GNU Project debugger) enhanced for Rust debugging. It provides low-level debugging capabilities including breakpoints, execution tracing, runtime modification, and memory inspection. Designed for command-line debugging with deep system integration for comprehensive Rust application analysis.

    • rust-lldb

      rust-lldb is LLDB debugger enhanced with Rust-specific modifications for understanding Rust data structures and concepts. It includes pretty-printers for standard library types and comes bundled with the Rust compiler, providing better debugging experience for Rust applications.

Questions about the Rust Roadmap

Is the Rust Roadmap free?

Yes. All 122 lessons in this roadmap are free to read on Bibha AI Learning Labs, with no account and no payment. Signing in is optional: it lets you mark lessons as done and keep your progress, and it opens the AI tutor, which runs on your own API key.

How long does the Rust Roadmap take?

There is no fixed duration. It has 122 lessons in 23 stages, and the time it takes depends on how many hours you give it each week. Nothing is locked, so you can skip what you already know, and your progress is saved once you sign in.

Where should I start the Rust Roadmap?

Start with stage 1, Introduction, and work down in order. The stages are numbered in the order the roadmap suggests, but every lesson is open, so if you already know Introduction you can go straight to Language Basics or anything after it. Each lesson links to free resources for going deeper.

Can I learn Rust in Hindi?

The lessons are written in English. Once you sign in, you can ask the AI tutor on any lesson to explain it in Hindi or Hinglish. It answers from that lesson’s own text, so the explanation stays on the syllabus. The tutor runs on your own Google, OpenAI or Anthropic key.

Still confused? Ask me