<!-- Keep first page as index.md to avoid giving it two names. --> [Welcome to Comprehensive Rust 🦀](index.md) - [Running the Course](running-the-course.md) - [Course Structure](running-the-course/course-structure.md) - [Keyboard Shortcuts](running-the-course/keyboard-shortcuts.md) - [Translations](running-the-course/translations.md) - [Using Cargo](cargo.md) - [Rust Ecosystem](cargo/rust-ecosystem.md) - [Code Samples](cargo/code-samples.md) - [Running Cargo Locally](cargo/running-locally.md) ---- # Day 1: Morning - [Welcome](welcome-day-1.md) - [Hello, World](hello-world.md) - [What is Rust?](hello-world/what-is-rust.md) - [Hello, World](hello-world/hello-world.md) - [Benefits of Rust](hello-world/benefits.md) - [Playground](hello-world/playground.md) - [Types and Values](types-and-values.md) - [Variables](types-and-values/variables.md) - [Values](types-and-values/values.md) - [Arithmetic](types-and-values/arithmetic.md) - [Strings](types-and-values/strings.md) - [Type Inference](types-and-values/inference.md) - [Exercise: Fibonacci](types-and-values/exercise.md) - [Solution](types-and-values/solution.md) - [Control Flow Basics](control-flow-basics.md) - [Conditionals](control-flow-basics/conditionals.md) - [Loops](control-flow-basics/loops.md) - [`break` and `continue`](control-flow-basics/break-continue.md) - [Blocks and Scopes](control-flow-basics/blocks-and-scopes.md) - [Functions](control-flow-basics/functions.md) - [Macros](control-flow-basics/macros.md) - [Exercise: Collatz Sequence](control-flow-basics/exercise.md) - [Solution](control-flow-basics/solution.md) # Day 1: Afternoon - [Welcome](welcome-day-1-afternoon.md) - [Tuples and Arrays](tuples-and-arrays.md) - [Tuples and Arrays](tuples-and-arrays/tuples-and-arrays.md) - [Array Iteration](tuples-and-arrays/iteration.md) - [Pattern Matching](tuples-and-arrays/match.md) - [Destructuring](tuples-and-arrays/destructuring.md) - [Exercise: Nested Arrays](tuples-and-arrays/exercise.md) - [Solution](tuples-and-arrays/solution.md) - [References](references.md) - [Shared References](references/shared.md) - [Exclusive References](references/exclusive.md) - [Exercise: Geometry](references/exercise.md) - [Solution](references/solution.md) - [User-Defined Types](user-defined-types.md) - [Named Structs](user-defined-types/named-structs.md) - [Tuple Structs](user-defined-types/tuple-structs.md) - [Enums](user-defined-types/enums.md) - [Static and Const](user-defined-types/static-and-const.md) - [Type Aliases](user-defined-types/aliases.md) - [Exercise: Elevator Events](user-defined-types/exercise.md) - [Solution](user-defined-types/solution.md) ---- # Day 2: Morning - [Welcome](welcome-day-2.md) - [Pattern Matching](pattern-matching.md) - [Destructuring](pattern-matching/destructuring.md) - [Let Control Flow](pattern-matching/let-control-flow.md) - [Exercise: Expression Evaluation](pattern-matching/exercise.md) - [Solution](pattern-matching/solution.md) - [Methods and Traits](methods-and-traits.md) - [Methods](methods-and-traits/methods.md) - [Traits](methods-and-traits/traits.md) - [Deriving](methods-and-traits/deriving.md) - [Trait Objects](methods-and-traits/trait-objects.md) - [Exercise: GUI Library](methods-and-traits/exercise.md) - [Solution](methods-and-traits/solution.md) - [Generics](generics.md) - [Generic Functions](generics/generic-functions.md) - [Generic Data Types](generics/generic-data.md) - [Trait Bounds](generics/trait-bounds.md) - [`impl Trait`](generics/impl-trait.md) - [Exercise: Generic `min`](generics/exercise.md) - [Solution](generics/solution.md) # Day 2: Afternoon - [Welcome](welcome-day-2-afternoon.md) - [Standard Library Types](std-types.md) - [Standard Library](std-types/std.md) - [Documentation](std-types/docs.md) - [`Option`](std-types/option.md) - [`Result`](std-types/result.md) - [`String`](std-types/string.md) - [`Vec`](std-types/vec.md) - [`HashMap`](std-types/hashmap.md) - [Exercise: Counter](std-types/exercise.md) - [Solution](std-types/solution.md) - [Standard Library Traits](std-traits.md) - [Comparisons](std-traits/comparisons.md) - [Operators](std-traits/operators.md) - [`From` and `Into`](std-traits/from-and-into.md) - [Casting](std-traits/casting.md) - [`Read` and `Write`](std-traits/read-and-write.md) - [`Default`, struct update syntax](std-traits/default.md) - [Closures](std-traits/closures.md) - [Exercise: ROT13](std-traits/exercise.md) - [Solution](std-traits/solution.md) ---- # Day 3: Morning - [Welcome](welcome-day-3.md) - [Memory Management](memory-management.md) - [Review of Program Memory](memory-management/review.md) - [Approaches to Memory Management](memory-management/approaches.md) - [Ownership](memory-management/ownership.md) - [Move Semantics](memory-management/move.md) - [`Clone`](memory-management/clone.md) - [Copy Types](memory-management/copy-types.md) - [`Drop`](memory-management/drop.md) - [Exercise: Builder Type](memory-management/exercise.md) - [Solution](memory-management/solution.md) - [Smart Pointers](smart-pointers.md) - [`Box<T>`](smart-pointers/box.md) - [`Rc`](smart-pointers/rc.md) - [Exercise: Binary Tree](smart-pointers/exercise.md) - [Solution](smart-pointers/solution.md) # Day 3: Afternoon - [Welcome](welcome-day-3-afternoon.md) - [Borrowing](borrowing.md) - [Borrowing a Value](borrowing/shared.md) - [Borrow Checking](borrowing/borrowck.md) - [Interior Mutability](borrowing/interior-mutability.md) - [Exercise: Health Statistics](borrowing/exercise.md) - [Solution](borrowing/solution.md) - [Slices and Lifetimes](slices-and-lifetimes.md) - [Slices: `&[T]`](slices-and-lifetimes/slices.md) - [String References](slices-and-lifetimes/str.md) - [Lifetime Annotations](slices-and-lifetimes/lifetime-annotations.md) - [Lifetime Elision](slices-and-lifetimes/lifetime-elision.md) - [Struct Lifetimes](slices-and-lifetimes/struct-lifetimes.md) - [Exercise: Protobuf Parsing](slices-and-lifetimes/exercise.md) - [Solution](slices-and-lifetimes/solution.md) --- # Day 4: Morning - [Welcome](welcome-day-4.md) - [Iterators](iterators.md) - [`Iterator`](iterators/iterator.md) - [`IntoIterator`](iterators/intoiterator.md) - [`FromIterator`](iterators/fromiterator.md) - [Exercise: Iterator Method Chaining](iterators/exercise.md) - [Solution](iterators/solution.md) - [Modules](modules.md) - [Modules](modules/modules.md) - [Filesystem Hierarchy](modules/filesystem.md) - [Visibility](modules/visibility.md) - [`use`, `super`, `self`](modules/paths.md) - [Exercise: Modules for the GUI Library](modules/exercise.md) - [Solution](modules/solution.md) - [Testing](testing.md) - [Test Modules](testing/unit-tests.md) - [Other Types of Tests](testing/other.md) - [Useful Crates](testing/useful-crates.md) - [GoogleTest](testing/googletest.md) - [Mocking](testing/mocking.md) - [Compiler Lints and Clippy](testing/lints.md) - [Exercise: Luhn Algorithm](testing/exercise.md) - [Solution](testing/solution.md) # Day 4: Afternoon - [Welcome](welcome-day-4-afternoon.md) - [Error Handling](error-handling.md) - [Panics](error-handling/panics.md) - [Try Operator](error-handling/try.md) - [Try Conversions](error-handling/try-conversions.md) - [`Error` Trait](error-handling/error.md) - [`thiserror` and `anyhow`](error-handling/thiserror-and-anyhow.md) - [Exercise: Rewriting with `Result`](error-handling/exercise.md) - [Solution](error-handling/solution.md) - [Unsafe Rust](unsafe-rust.md) - [Unsafe](unsafe-rust/unsafe.md) - [Dereferencing Raw Pointers](unsafe-rust/dereferencing.md) - [Mutable Static Variables](unsafe-rust/mutable-static.md) - [Unions](unsafe-rust/unions.md) - [Unsafe Functions](unsafe-rust/unsafe-functions.md) - [Unsafe Traits](unsafe-rust/unsafe-traits.md) - [Exercise: FFI Wrapper](unsafe-rust/exercise.md) - [Solution](unsafe-rust/solution.md) # Android ---- - [Welcome](android.md) - [Setup](android/setup.md) - [Build Rules](android/build-rules.md) - [Binary](android/build-rules/binary.md) - [Library](android/build-rules/library.md) - [AIDL](android/aidl.md) - [Interface](android/aidl/interface.md) - [Implementation](android/aidl/implementation.md) - [Server](android/aidl/server.md) - [Deploy](android/aidl/deploy.md) - [Client](android/aidl/client.md) - [Changing API](android/aidl/changing.md) - [Logging](android/logging.md) - [Interoperability](android/interoperability.md) - [With C](android/interoperability/with-c.md) - [Calling C with Bindgen](android/interoperability/with-c/bindgen.md) - [Calling Rust from C](android/interoperability/with-c/rust.md) - [With C++](android/interoperability/cpp.md)) - [The Bridge Module](android/interoperability/cpp/bridge.md) - [Rust Bridge](android/interoperability/cpp/rust-bridge.md) - [Generated C++](android/interoperability/cpp/generated-cpp.md) - [C++ Bridge](android/interoperability/cpp/cpp-bridge.md) - [Shared Types](android/interoperability/cpp/shared-types.md) - [Shared Enums](android/interoperability/cpp/shared-enums.md) - [Rust Error Handling](android/interoperability/cpp/rust-result.md) - [C++ Error Handling](android/interoperability/cpp/cpp-exception.md) - [Additional Types](android/interoperability/cpp/type-mapping.md) - [Building for Android: C++](android/interoperability/cpp/android-build-cpp.md) - [Building for Android: Genrules](android/interoperability/cpp/android-cpp-genrules.md) - [Building for Android: Rust](android/interoperability/cpp/android-build-rust.md) - [With Java](android/interoperability/java.md) - [Exercises](exercises/android/morning.md) # Chromium ---- - [Welcome](chromium.md) - [Setup](chromium/setup.md) - [Comparing Chromium and Cargo Ecosystems](chromium/cargo.md) - [Policy](chromium/policy.md) - [Build Rules](chromium/build-rules.md) - [Unsafe Code](chromium/build-rules/unsafe.md) - [Depending on Rust Code from Chromium C++](chromium/build-rules/depending.md) - [Visual Studio Code](chromium/build-rules/vscode.md) - [Exercise](exercises/chromium/build-rules.md) - [Testing](chromium/testing.md) - [`rust_gtest_interop` Library](chromium/testing/rust-gtest-interop.md) - [GN Rules for Rust Tests](chromium/testing/build-gn.md) - [Exercise](exercises/chromium/testing.md) - [Interoperability with C++](chromium/interoperability-with-cpp.md) - [Example Bindings](chromium/interoperability-with-cpp/example-bindings.md) - [Limitations of CXX](chromium/interoperability-with-cpp/limitations-of-cxx.md) - [CXX Error Handling](chromium/interoperability-with-cpp/error-handling.md) - [Error Handling: QR Example](chromium/interoperability-with-cpp/error-handling-qr.md) - [Error Handling: PNG Example](chromium/interoperability-with-cpp/error-handling-png.md) - [Using CXX in Chromium](chromium/interoperability-with-cpp/using-cxx-in-chromium.md) - [Exercise](exercises/chromium/interoperability-with-cpp.md) - [Adding Third Party Crates](chromium/adding-third-party-crates.md) - [Configuring Cargo.toml](chromium/adding-third-party-crates/configuring-cargo-toml.md) - [Configuring `gnrt_config.toml`](chromium/adding-third-party-crates/configuring-gnrt-config-toml.md) - [Downloading Crates](chromium/adding-third-party-crates/downloading-crates.md) - [Generating `gn` Build Rules](chromium/adding-third-party-crates/generating-gn-build-rules.md) - [Resolving Problems](chromium/adding-third-party-crates/resolving-problems.md) - [Build Scripts Which Generate Code](chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md) - [Build Scripts Which Build C++ or Take Arbitrary Actions](chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md) - [Depending on a Crate](chromium/adding-third-party-crates/depending-on-a-crate.md) - [Reviews and Audits](chromium/adding-third-party-crates/reviews-and-audits.md) - [Checking into Chromium Source Code](chromium/adding-third-party-crates/checking-in.md) - [Keeping Crates Up to Date](chromium/adding-third-party-crates/keeping-up-to-date.md) - [Exercise](exercises/chromium/third-party.md) - [Bringing It Together - Exercise](exercises/chromium/bringing-it-together.md) - [Exercise Solutions](exercises/chromium/solutions.md) # Bare Metal: Morning ---- - [Welcome](bare-metal.md) - [`no_std`](bare-metal/no_std.md) - [A Minimal Example](bare-metal/minimal.md) - [`alloc`](bare-metal/alloc.md) - [Microcontrollers](bare-metal/microcontrollers.md) - [Raw MMIO](bare-metal/microcontrollers/mmio.md) - [PACs](bare-metal/microcontrollers/pacs.md) - [HAL Crates](bare-metal/microcontrollers/hals.md) - [Board Support Crates](bare-metal/microcontrollers/board-support.md) - [The Type State Pattern](bare-metal/microcontrollers/type-state.md) - [`embedded-hal`](bare-metal/microcontrollers/embedded-hal.md) - [`probe-rs` and `cargo-embed`](bare-metal/microcontrollers/probe-rs.md) - [Debugging](bare-metal/microcontrollers/debugging.md) - [Other Projects](bare-metal/microcontrollers/other-projects.md) - [Exercises](exercises/bare-metal/morning.md) - [Compass](exercises/bare-metal/compass.md) - [Solutions](exercises/bare-metal/solutions-morning.md) # Bare Metal: Afternoon - [Application Processors](bare-metal/aps.md) - [Getting Ready to Rust](bare-metal/aps/entry-point.md) - [Inline Assembly](bare-metal/aps/inline-assembly.md) - [MMIO](bare-metal/aps/mmio.md) - [Let's Write a UART Driver](bare-metal/aps/uart.md) - [More Traits](bare-metal/aps/uart/traits.md) - [A Better UART Driver](bare-metal/aps/better-uart.md) - [Bitflags](bare-metal/aps/better-uart/bitflags.md) - [Multiple Registers](bare-metal/aps/better-uart/registers.md) - [Driver](bare-metal/aps/better-uart/driver.md) - [Using It](bare-metal/aps/better-uart/using.md) - [Logging](bare-metal/aps/logging.md) - [Using It](bare-metal/aps/logging/using.md) - [Exceptions](bare-metal/aps/exceptions.md) - [Other Projects](bare-metal/aps/other-projects.md) - [Useful Crates](bare-metal/useful-crates.md) - [`zerocopy`](bare-metal/useful-crates/zerocopy.md) - [`aarch64-paging`](bare-metal/useful-crates/aarch64-paging.md) - [`buddy_system_allocator`](bare-metal/useful-crates/buddy_system_allocator.md) - [`tinyvec`](bare-metal/useful-crates/tinyvec.md) - [`spin`](bare-metal/useful-crates/spin.md) - [Android](bare-metal/android.md) - [`vmbase`](bare-metal/android/vmbase.md) - [Exercises](exercises/bare-metal/afternoon.md) - [RTC Driver](exercises/bare-metal/rtc.md) - [Solutions](exercises/bare-metal/solutions-afternoon.md) # Concurrency: Morning ---- - [Welcome](concurrency.md) - [Threads](concurrency/threads.md) - [Scoped Threads](concurrency/scoped-threads.md) - [Channels](concurrency/channels.md) - [Unbounded Channels](concurrency/channels/unbounded.md) - [Bounded Channels](concurrency/channels/bounded.md) - [`Send` and `Sync`](concurrency/send-sync.md) - [`Send`](concurrency/send-sync/send.md) - [`Sync`](concurrency/send-sync/sync.md) - [Examples](concurrency/send-sync/examples.md) - [Shared State](concurrency/shared_state.md) - [`Arc`](concurrency/shared_state/arc.md) - [`Mutex`](concurrency/shared_state/mutex.md) - [Example](concurrency/shared_state/example.md) - [Exercises](exercises/concurrency/morning.md) - [Dining Philosophers](exercises/concurrency/dining-philosophers.md) - [Multi-threaded Link Checker](exercises/concurrency/link-checker.md) - [Solutions](exercises/concurrency/solutions-morning.md) # Concurrency: Afternoon - [Async Basics](async.md) - [`async`/`await`](async/async-await.md) - [Futures](async/futures.md) - [Runtimes](async/runtimes.md) - [Tokio](async/runtimes/tokio.md) - [Tasks](async/tasks.md) - [Async Channels](async/channels.md) - [Control Flow](async/control-flow.md) - [Join](async/control-flow/join.md) - [Select](async/control-flow/select.md) - [Pitfalls](async/pitfalls.md) - [Blocking the Executor](async/pitfalls/blocking-executor.md) - [`Pin`](async/pitfalls/pin.md) - [Async Traits](async/pitfalls/async-traits.md) - [Cancellation](async/pitfalls/cancellation.md) - [Exercises](exercises/concurrency/afternoon.md) - [Dining Philosophers](exercises/concurrency/dining-philosophers-async.md) - [Broadcast Chat Application](exercises/concurrency/chat-app.md) - [Solutions](exercises/concurrency/solutions-afternoon.md) # Final Words ---- - [Thanks!](thanks.md) - [Glossary](glossary.md) - [Other Resources](other-resources.md) - [Credits](credits.md)