1. Welcome to Comprehensive Rust 🦀
  2. Running the Course
    1. Course Structure
    2. Keyboard Shortcuts
    3. Translations
  3. Using Cargo
    1. Rust Ecosystem
    2. Code Samples
    3. Running Cargo Locally
  4. Day 1: Morning
  5. Welcome
  6. Hello, World
    1. What is Rust?
    2. Benefits of Rust
    3. Playground
  7. Types and Values
    1. Hello, World
    2. Variables
    3. Values
    4. Arithmetic
    5. Type Inference
    6. Exercise: Fibonacci
      1. Solution
  8. Control Flow Basics
    1. Blocks and Scopes
    2. if Expressions
    3. match Expressions
    4. Loops
      1. for
      2. loop
    5. break and continue
      1. Labels
    6. Functions
    7. Macros
    8. Exercise: Collatz Sequence
      1. Solution
  9. Day 1: Afternoon
  10. Welcome
  11. Tuples and Arrays
    1. Arrays
    2. Tuples
    3. Array Iteration
    4. Patterns and Destructuring
    5. Exercise: Nested Arrays
      1. Solution
  12. References
    1. Shared References
    2. Exclusive References
    3. Slices
    4. Strings
    5. Reference Validity
    6. Exercise: Geometry
      1. Solution
  13. User-Defined Types
    1. Named Structs
    2. Tuple Structs
    3. Enums
    4. Type Aliases
    5. Const
    6. Static
    7. Exercise: Elevator Events
      1. Solution
  14. Day 2: Morning
  15. Welcome
  16. Pattern Matching
    1. Irrefutable Patterns
    2. Matching Values
    3. Destructuring Structs
    4. Destructuring Enums
    5. Let Control Flow
      1. if let Expressions
      2. while let Statements
      3. let else
    6. Exercise: Expression Evaluation
      1. Solution
  17. Methods and Traits
    1. Methods
    2. Traits
      1. Implementing Traits
      2. Supertraits
      3. Associated Types
    3. Deriving
    4. Exercise: Generic Logger
      1. Solution
  18. Generics
    1. Generic Functions
    2. Trait Bounds
    3. Generic Data Types
    4. Generic Traits
    5. impl Trait
    6. dyn Trait
    7. Exercise: Generic min
      1. Solution
  19. Day 2: Afternoon
  20. Welcome
  21. Standard Library Types
    1. Standard Library
    2. Documentation
    3. Option
    4. Result
    5. String
    6. Vec
    7. HashMap
    8. Exercise: Counter
      1. Solution
  22. Standard Library Traits
    1. Comparisons
    2. Operators
    3. From and Into
    4. Casting
    5. Read and Write
    6. Default, struct update syntax
    7. Exercise: ROT13
      1. Solution
  23. Closures
    1. Closure Syntax
    2. Capturing
    3. Closure Traits
    4. Exercise: Log Filter
      1. Solution
  24. Day 3: Morning
  25. Welcome
  26. Memory Management
    1. Review of Program Memory
    2. Approaches to Memory Management
    3. Ownership
    4. Move Semantics
    5. Clone
    6. Copy Types
    7. Drop
    8. Exercise: Builder Type
      1. Solution
  27. Smart Pointers
    1. Box<T>
    2. Rc
    3. Owned Trait Objects
    4. Exercise: Binary Tree
      1. Solution
  28. Day 3: Afternoon
  29. Welcome
  30. Borrowing
    1. Borrowing a Value
    2. Borrow Checking
    3. Borrow Errors
    4. Interior Mutability
      1. Cell
      2. RefCell
    5. Exercise: Health Statistics
      1. Solution
  31. Lifetimes
    1. Lifetime Annotations
    2. Lifetime Elision
    3. Lifetimes in Data Structures
    4. Exercise: Protobuf Parsing
      1. Solution
  32. Day 4: Morning
  33. Welcome
  34. Iterators
    1. Motivation
    2. Iterator Trait
    3. Iterator Helper Methods
    4. collect
    5. IntoIterator
    6. Exercise: Iterator Method Chaining
      1. Solution
  35. Modules
    1. Modules
    2. Filesystem Hierarchy
    3. Visibility
    4. Encapsulation
    5. use, super, self
    6. Exercise: Modules for a GUI Library
      1. Solution
  36. Testing
    1. Unit Tests
    2. Other Types of Tests
    3. Compiler Lints and Clippy
    4. Exercise: Luhn Algorithm
      1. Solution
  37. Day 4: Afternoon
  38. Welcome
  39. Error Handling
    1. Panics
    2. Result
    3. Try Operator
    4. Try Conversions
    5. Error Trait
    6. thiserror
    7. anyhow
    8. Exercise: Rewriting with Result
      1. Solution
  40. Unsafe Rust
    1. Unsafe
    2. Dereferencing Raw Pointers
    3. Mutable Static Variables
    4. Unions
    5. Unsafe Functions
      1. Unsafe Rust Functions
      2. Unsafe External Functions
      3. Calling Unsafe Functions
    6. Unsafe Traits
    7. Exercise: FFI Wrapper
      1. Solution
  41. Android
  42. Welcome
  43. Setup
  44. Build Rules
    1. Binary
    2. Library
  45. AIDL
    1. Birthday Service Tutorial
      1. Interface
      2. Service API
      3. Service
      4. Server
      5. Deploy
      6. Client
      7. Changing API
      8. Updating Implementations
    2. AIDL Types
      1. Primitive Types
      2. Array Types
      3. Sending Objects
      4. Parcelables
      5. Sending Files
  46. Testing
    1. GoogleTest
    2. Mocking
  47. Logging
  48. Interoperability
    1. With C
      1. Calling C with Bindgen
      2. Calling Rust from C
    2. With C++
      1. The Bridge Module
      2. Rust Bridge
      3. Generated C++
      4. C++ Bridge
      5. Shared Types
      6. Shared Enums
      7. Rust Error Handling
      8. C++ Error Handling
      9. Additional Types
      10. Building for Android: C++
      11. Building for Android: Genrules
      12. Building for Android: Rust
    3. With Java
  49. Chromium
  50. Welcome
  51. Setup
  52. Comparing Chromium and Cargo Ecosystems
  53. Policy
  54. Build Rules
    1. Unsafe Code
    2. Depending on Rust Code from Chromium C++
    3. Visual Studio Code
    4. Exercise
  55. Testing
    1. rust_gtest_interop Library
    2. GN Rules for Rust Tests
    3. chromium::import! Macro
    4. Exercise
  56. Interoperability with C++
    1. Example Bindings
    2. Limitations of CXX
    3. CXX Error Handling
      1. Error Handling: QR Example
      2. Error Handling: PNG Example
    4. Using CXX in Chromium
    5. Exercise
  57. Adding Third Party Crates
    1. Configuring Cargo.toml
    2. Configuring gnrt_config.toml
    3. Downloading Crates
    4. Generating gn Build Rules
    5. Resolving Problems
      1. Build Scripts Which Generate Code
      2. Build Scripts Which Build C++ or Take Arbitrary Actions
    6. Depending on a Crate
    7. Reviews and Audits
    8. Checking into Chromium Source Code
    9. Keeping Crates Up to Date
    10. Exercise
  58. Bringing It Together - Exercise
  59. Exercise Solutions
  60. Bare Metal: Morning
  61. Welcome
  62. no_std
    1. A Minimal Example
    2. alloc
  63. Microcontrollers
    1. Raw MMIO
    2. PACs
    3. HAL Crates
    4. Board Support Crates
    5. The Type State Pattern
    6. embedded-hal
    7. probe-rs and cargo-embed
      1. Debugging
    8. Other Projects
  64. Exercises
    1. Compass
    2. Solutions
  65. Bare Metal: Afternoon
  66. Application Processors
    1. Getting Ready to Rust
    2. Inline Assembly
    3. MMIO
    4. Let's Write a UART Driver
      1. More Traits
      2. Using It
    5. A Better UART Driver
      1. Bitflags
      2. Multiple Registers
      3. Driver
      4. Using It
    6. Logging
      1. Using It
    7. Exceptions
    8. Other Projects
  67. Useful Crates
    1. zerocopy
    2. aarch64-paging
    3. buddy_system_allocator
    4. tinyvec
    5. spin
  68. Bare-Metal on Android
    1. vmbase
  69. Exercises
    1. RTC Driver
    2. Solutions
  70. Concurrency: Morning
  71. Welcome
  72. Threads
    1. Plain Threads
    2. Scoped Threads
  73. Channels
    1. Senders and Receivers
    2. Unbounded Channels
    3. Bounded Channels
  74. Send and Sync
    1. Marker Traits
    2. Send
    3. Sync
    4. Examples
  75. Shared State
    1. Arc
    2. Mutex
    3. Example
  76. Exercises
    1. Dining Philosophers
    2. Multi-threaded Link Checker
    3. Solutions
  77. Concurrency: Afternoon
  78. Welcome
  79. Async Basics
    1. async/await
    2. Futures
    3. Runtimes
      1. Tokio
    4. Tasks
  80. Channels and Control Flow
    1. Async Channels
    2. Join
    3. Select
  81. Pitfalls
    1. Blocking the Executor
    2. Pin
    3. Async Traits
    4. Cancellation
  82. Exercises
    1. Dining Philosophers
    2. Broadcast Chat Application
    3. Solutions
  83. Final Words
  84. Thanks!
  85. Glossary
  86. Other Resources
  87. Credits