2022-12-21 16:36:30 +01:00
|
|
|
# Summary
|
|
|
|
|
|
|
|
[Welcome to Comprehensive Rust 🦀](welcome.md)
|
2023-01-06 10:40:37 +01:00
|
|
|
- [Running the Course](running-the-course.md)
|
|
|
|
- [Course Structure](running-the-course/course-structure.md)
|
2023-03-10 09:07:36 -05:00
|
|
|
- [Day 4](running-the-course/day-4.md)
|
2023-01-06 10:40:37 +01:00
|
|
|
- [Keyboard Shortcuts](running-the-course/keyboard-shortcuts.md)
|
2023-02-16 13:21:45 +01:00
|
|
|
- [Translations](running-the-course/translations.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [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)
|
|
|
|
- [What is Rust?](welcome-day-1/what-is-rust.md)
|
|
|
|
- [Hello World!](hello-world.md)
|
|
|
|
- [Small Example](hello-world/small-example.md)
|
|
|
|
- [Why Rust?](why-rust.md)
|
|
|
|
- [Compile Time Guarantees](why-rust/compile-time.md)
|
|
|
|
- [Runtime Guarantees](why-rust/runtime.md)
|
|
|
|
- [Modern Features](why-rust/modern.md)
|
|
|
|
- [Basic Syntax](basic-syntax.md)
|
|
|
|
- [Scalar Types](basic-syntax/scalar-types.md)
|
|
|
|
- [Compound Types](basic-syntax/compound-types.md)
|
|
|
|
- [References](basic-syntax/references.md)
|
|
|
|
- [Dangling References](basic-syntax/references-dangling.md)
|
|
|
|
- [Slices](basic-syntax/slices.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [String vs str](basic-syntax/string-slices.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Functions](basic-syntax/functions.md)
|
2023-03-21 12:15:07 -04:00
|
|
|
- [Rustdoc](basic-syntax/rustdoc.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Methods](basic-syntax/methods.md)
|
|
|
|
- [Overloading](basic-syntax/functions-interlude.md)
|
|
|
|
- [Exercises](exercises/day-1/morning.md)
|
|
|
|
- [Implicit Conversions](exercises/day-1/implicit-conversions.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [Arrays and for Loops](exercises/day-1/for-loops.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
|
|
|
|
# Day 1: Afternoon
|
|
|
|
|
|
|
|
- [Variables](basic-syntax/variables.md)
|
|
|
|
- [Type Inference](basic-syntax/type-inference.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [static & const](basic-syntax/static-and-const.md))
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Scopes and Shadowing](basic-syntax/scopes-shadowing.md)
|
|
|
|
- [Memory Management](memory-management.md)
|
|
|
|
- [Stack vs Heap](memory-management/stack-vs-heap.md)
|
|
|
|
- [Stack Memory](memory-management/stack.md)
|
|
|
|
- [Manual Memory Management](memory-management/manual.md)
|
|
|
|
- [Scope-Based Memory Management](memory-management/scope-based.md)
|
|
|
|
- [Garbage Collection](memory-management/garbage-collection.md)
|
|
|
|
- [Rust Memory Management](memory-management/rust.md)
|
|
|
|
- [Comparison](memory-management/comparison.md)
|
|
|
|
- [Ownership](ownership.md)
|
|
|
|
- [Move Semantics](ownership/move-semantics.md)
|
|
|
|
- [Moved Strings in Rust](ownership/moved-strings-rust.md)
|
|
|
|
- [Double Frees in Modern C++](ownership/double-free-modern-cpp.md)
|
|
|
|
- [Moves in Function Calls](ownership/moves-function-calls.md)
|
|
|
|
- [Copying and Cloning](ownership/copy-clone.md)
|
|
|
|
- [Borrowing](ownership/borrowing.md)
|
|
|
|
- [Shared and Unique Borrows](ownership/shared-unique-borrows.md)
|
|
|
|
- [Lifetimes](ownership/lifetimes.md)
|
|
|
|
- [Lifetimes in Function Calls](ownership/lifetimes-function-calls.md)
|
|
|
|
- [Lifetimes in Data Structures](ownership/lifetimes-data-structures.md)
|
|
|
|
- [Exercises](exercises/day-1/afternoon.md)
|
|
|
|
- [Designing a Library](exercises/day-1/book-library.md)
|
|
|
|
- [Iterators and Ownership](exercises/day-1/iterators-and-ownership.md)
|
|
|
|
|
|
|
|
|
|
|
|
# Day 2: Morning
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
- [Welcome](welcome-day-2.md)
|
|
|
|
- [Structs](structs.md)
|
|
|
|
- [Tuple Structs](structs/tuple-structs.md)
|
|
|
|
- [Field Shorthand Syntax](structs/field-shorthand.md)
|
|
|
|
- [Enums](enums.md)
|
|
|
|
- [Variant Payloads](enums/variant-payloads.md)
|
|
|
|
- [Enum Sizes](enums/sizes.md)
|
|
|
|
- [Methods](methods.md)
|
|
|
|
- [Method Receiver](methods/receiver.md)
|
|
|
|
- [Example](methods/example.md)
|
|
|
|
- [Pattern Matching](pattern-matching.md)
|
|
|
|
- [Destructuring Enums](pattern-matching/destructuring-enums.md)
|
|
|
|
- [Destructuring Structs](pattern-matching/destructuring-structs.md)
|
|
|
|
- [Destructuring Arrays](pattern-matching/destructuring-arrays.md)
|
|
|
|
- [Match Guards](pattern-matching/match-guards.md)
|
|
|
|
- [Exercises](exercises/day-2/morning.md)
|
|
|
|
- [Health Statistics](exercises/day-2/health-statistics.md)
|
|
|
|
- [Points and Polygons](exercises/day-2/points-polygons.md)
|
|
|
|
|
|
|
|
# Day 2: Afternoon
|
|
|
|
|
|
|
|
- [Control Flow](control-flow.md)
|
|
|
|
- [Blocks](control-flow/blocks.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [if expressions](control-flow/if-expressions.md)
|
|
|
|
- [if let expressions](control-flow/if-let-expressions.md)
|
|
|
|
- [while expressions](control-flow/while-expressions.md)
|
|
|
|
- [while let expressions](control-flow/while-let-expressions.md)
|
|
|
|
- [for expressions](control-flow/for-expressions.md)
|
|
|
|
- [loop expressions](control-flow/loop-expressions.md)
|
|
|
|
- [match expressions](control-flow/match-expressions.md)
|
|
|
|
- [break & continue](control-flow/break-continue.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Standard Library](std.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [Option and Result](std/option-result.md)
|
2023-01-31 21:04:17 +01:00
|
|
|
- [String](std/string.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [Vec](std/vec.md)
|
|
|
|
- [HashMap](std/hashmap.md)
|
|
|
|
- [Box](std/box.md)
|
|
|
|
- [Recursive Data Types](std/box-recursive.md)
|
|
|
|
- [Niche Optimization](std/box-niche.md)
|
|
|
|
- [Rc](std/rc.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Modules](modules.md)
|
|
|
|
- [Visibility](modules/visibility.md)
|
|
|
|
- [Paths](modules/paths.md)
|
|
|
|
- [Filesystem Hierarchy](modules/filesystem.md)
|
|
|
|
- [Exercises](exercises/day-2/afternoon.md)
|
|
|
|
- [Luhn Algorithm](exercises/day-2/luhn.md)
|
|
|
|
- [Strings and Iterators](exercises/day-2/strings-iterators.md)
|
|
|
|
|
|
|
|
|
|
|
|
# Day 3: Morning
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
- [Welcome](welcome-day-3.md)
|
|
|
|
- [Traits](traits.md)
|
|
|
|
- [Deriving Traits](traits/deriving-traits.md)
|
|
|
|
- [Default Methods](traits/default-methods.md)
|
|
|
|
- [Important Traits](traits/important-traits.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [Iterator](traits/iterator.md)
|
|
|
|
- [FromIterator](traits/from-iterator.md)
|
|
|
|
- [From and Into](traits/from-into.md)
|
|
|
|
- [Read and Write](traits/read-write.md)
|
|
|
|
- [Add, Mul, ...](traits/operators.md)
|
|
|
|
- [Drop](traits/drop.md)
|
2023-02-06 19:17:21 +00:00
|
|
|
- [Default](traits/default.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Generics](generics.md)
|
|
|
|
- [Generic Data Types](generics/data-types.md)
|
|
|
|
- [Generic Methods](generics/methods.md)
|
|
|
|
- [Trait Bounds](generics/trait-bounds.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [impl Trait](generics/impl-trait.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Closures](generics/closures.md)
|
|
|
|
- [Monomorphization](generics/monomorphization.md)
|
|
|
|
- [Trait Objects](generics/trait-objects.md)
|
|
|
|
- [Exercises](exercises/day-3/morning.md)
|
|
|
|
- [A Simple GUI Library](exercises/day-3/simple-gui.md)
|
|
|
|
|
|
|
|
# Day 3: Afternoon
|
|
|
|
|
|
|
|
- [Error Handling](error-handling.md)
|
|
|
|
- [Panics](error-handling/panics.md)
|
|
|
|
- [Catching Stack Unwinding](error-handling/panic-unwind.md)
|
|
|
|
- [Structured Error Handling](error-handling/result.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [Propagating Errors with ?](error-handling/try-operator.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Converting Error Types](error-handling/converting-error-types.md)
|
2023-02-03 10:12:31 +00:00
|
|
|
- [Example](error-handling/converting-error-types-example.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Deriving Error Enums](error-handling/deriving-error-enums.md)
|
2023-01-16 17:50:10 +00:00
|
|
|
- [Dynamic Error Types](error-handling/dynamic-errors.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Adding Context to Errors](error-handling/error-contexts.md)
|
|
|
|
- [Testing](testing.md)
|
|
|
|
- [Unit Tests](testing/unit-tests.md)
|
|
|
|
- [Test Modules](testing/test-modules.md)
|
|
|
|
- [Documentation Tests](testing/doc-tests.md)
|
|
|
|
- [Integration Tests](testing/integration-tests.md)
|
|
|
|
- [Unsafe Rust](unsafe.md)
|
|
|
|
- [Dereferencing Raw Pointers](unsafe/raw-pointers.md)
|
|
|
|
- [Mutable Static Variables](unsafe/mutable-static-variables.md)
|
2023-01-17 12:43:00 +00:00
|
|
|
- [Unions](unsafe/unions.md)
|
2023-01-17 17:13:10 +00:00
|
|
|
- [Calling Unsafe Functions](unsafe/calling-unsafe-functions.md)
|
|
|
|
- [Writing Unsafe Functions](unsafe/writing-unsafe-functions.md)
|
2023-01-17 16:41:40 +00:00
|
|
|
- [Extern Functions](unsafe/extern-functions.md)
|
2023-01-17 16:41:51 +00:00
|
|
|
- [Implementing Unsafe Traits](unsafe/unsafe-traits.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Exercises](exercises/day-3/afternoon.md)
|
|
|
|
- [Safe FFI Wrapper](exercises/day-3/safe-ffi-wrapper.md)
|
|
|
|
|
|
|
|
|
|
|
|
# Day 4: Morning
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
- [Welcome](welcome-day-4.md)
|
|
|
|
- [Concurrency](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)
|
|
|
|
- [Shared State](concurrency/shared_state.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [Arc](concurrency/shared_state/arc.md)
|
|
|
|
- [Mutex](concurrency/shared_state/mutex.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Example](concurrency/shared_state/example.md)
|
2023-01-08 13:45:19 +01:00
|
|
|
- [Send and Sync](concurrency/send-sync.md)
|
|
|
|
- [Send](concurrency/send-sync/send.md)
|
|
|
|
- [Sync](concurrency/send-sync/sync.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
- [Examples](concurrency/send-sync/examples.md)
|
|
|
|
- [Exercises](exercises/day-4/morning.md)
|
|
|
|
- [Dining Philosophers](exercises/day-4/dining-philosophers.md)
|
|
|
|
- [Multi-threaded Link Checker](exercises/day-4/link-checker.md)
|
|
|
|
|
2023-03-10 09:07:36 -05:00
|
|
|
# Day 4: Afternoon (Android)
|
2022-12-21 16:36:30 +01:00
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
- [Android](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))
|
|
|
|
- [With Java](android/interoperability/java.md)
|
2023-03-10 09:07:36 -05:00
|
|
|
- [Exercises](exercises/day-4/android.md)
|
2022-12-21 16:36:30 +01:00
|
|
|
|
|
|
|
# Final Words
|
|
|
|
|
|
|
|
- [Thanks!](thanks.md)
|
|
|
|
- [Other Resources](other-resources.md)
|
|
|
|
- [Credits](credits.md)
|
|
|
|
|
|
|
|
----
|
|
|
|
|
2023-03-17 16:43:30 +00:00
|
|
|
# Bare Metal Rust: Morning
|
2023-02-01 15:53:34 +00:00
|
|
|
|
2023-02-01 15:57:05 +00:00
|
|
|
- [Welcome](welcome-bare-metal.md)
|
2023-02-16 00:19:48 +00:00
|
|
|
- [no_std](bare-metal/no_std.md)
|
2023-02-01 16:24:45 +00:00
|
|
|
- [A minimal example](bare-metal/minimal.md)
|
2023-02-16 00:19:48 +00:00
|
|
|
- [alloc](bare-metal/alloc.md)
|
2023-02-02 16:13:24 +00:00
|
|
|
- [Microcontrollers](bare-metal/microcontrollers.md)
|
2023-02-16 03:16:49 +00:00
|
|
|
- [Raw MMIO](bare-metal/microcontrollers/mmio.md)
|
2023-02-02 16:13:24 +00:00
|
|
|
- [PACs](bare-metal/microcontrollers/pacs.md)
|
|
|
|
- [HAL crates](bare-metal/microcontrollers/hals.md)
|
2023-02-14 04:17:33 +00:00
|
|
|
- [Board support crates](bare-metal/microcontrollers/board-support.md)
|
2023-02-13 02:22:05 +00:00
|
|
|
- [The type state pattern](bare-metal/microcontrollers/type-state.md)
|
2023-02-10 04:06:36 +00:00
|
|
|
- [embedded-hal](bare-metal/microcontrollers/embedded-hal.md)
|
2023-03-09 11:55:42 +00:00
|
|
|
- [probe-rs, cargo-embed](bare-metal/microcontrollers/probe-rs.md)
|
|
|
|
- [Debugging](bare-metal/microcontrollers/debugging.md)
|
2023-02-13 03:12:58 +00:00
|
|
|
- [Other projects](bare-metal/microcontrollers/other-projects.md)
|
2023-02-14 04:17:33 +00:00
|
|
|
- [Exercises](exercises/bare-metal/morning.md)
|
2023-02-15 04:56:31 +00:00
|
|
|
- [Compass](exercises/bare-metal/compass.md)
|
2023-02-01 15:53:34 +00:00
|
|
|
|
2023-03-17 16:43:30 +00:00
|
|
|
# Bare Metal Rust: Afternoon
|
2023-02-01 15:53:34 +00:00
|
|
|
|
2023-02-28 03:01:05 +00:00
|
|
|
- [Application processors](bare-metal/aps.md)
|
2023-02-17 04:52:19 +00:00
|
|
|
- [MMIO](bare-metal/aps/mmio.md)
|
2023-02-01 15:53:34 +00:00
|
|
|
- [Let's write a UART driver]()
|
|
|
|
- [Logging]()
|
2023-02-28 03:01:05 +00:00
|
|
|
- [Other projects](bare-metal/aps/other-projects.md)
|
2023-02-01 15:53:34 +00:00
|
|
|
- [Useful crates]()
|
2023-02-16 00:19:48 +00:00
|
|
|
- [zerocopy]()
|
|
|
|
- [aarch64_paging]()
|
|
|
|
- [buddy_system_allocator]()
|
|
|
|
- [tinyvec]()
|
|
|
|
- [spin and once_cell]()
|
2023-02-01 15:53:34 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-12-21 16:36:30 +01:00
|
|
|
# Solutions
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
- [Solutions](exercises/solutions.md)
|
|
|
|
- [Day 1 Morning](exercises/day-1/solutions-morning.md)
|
|
|
|
- [Day 1 Afternoon](exercises/day-1/solutions-afternoon.md)
|
|
|
|
- [Day 2 Morning](exercises/day-2/solutions-morning.md)
|
|
|
|
- [Day 2 Afternoon](exercises/day-2/solutions-afternoon.md)
|
|
|
|
- [Day 3 Morning](exercises/day-3/solutions-morning.md)
|
|
|
|
- [Day 3 Afternoon](exercises/day-3/solutions-afternoon.md)
|
|
|
|
- [Day 4 Morning](exercises/day-4/solutions-morning.md)
|
2023-03-17 16:43:30 +00:00
|
|
|
- [Bare Metal Rust Morning](exercises/bare-metal/solutions-morning.md)
|