1.
Not Involved Resources
2.
Overviews
❱
2.1.
Rust By Examples
3.
Rust Topics
❱
3.1.
Cheat Sheets
❱
3.1.1.
Rust Language Cheat Sheet
3.1.2.
Quick Ref Me Rust
3.1.3.
Phaiax Rust Cheet Sheet
3.2.
chatGPT Rust Q&A
❱
3.2.1.
Experience & Pitfall
3.3.
Rust Video Summary
❱
3.3.1.
Rust Crash Course
3.3.2.
Generics, Traits, Lifetimes: Stop Duplicating Your Code
3.3.3.
Impl Rust
❱
3.3.3.1.
(3/7h)From cargo to crates.io and back again
3.3.3.2.
(3/6h)Implementing and optimizing a wordle solver in rust
3.3.3.3.
Solving Distributed System Challenges
3.3.3.4.
Setting up CI and property testing for a Rust Crate
3.3.4.
Code to the Moon
3.3.5.
Learn Rust Programming
❱
3.3.5.1.
⭐⭐⭐QA & Code Review
❱
3.3.5.1.1.
Answers to StackOverflow Top Rust Programming Questions Explained
3.3.5.1.2.
Rust Programming Q&A
3.3.5.1.3.
Conducting a code review of the jwtinfo crate
3.3.5.2.
Ownership and borrow checker
❱
3.3.5.2.1.
What is Ownership in Rust?
3.3.5.2.2.
What is Rust Borrow-checker and why is it useful
3.3.5.3.
Types
❱
3.3.5.3.1.
What is the difference between String and &str in rust
3.3.5.3.2.
Why Enums are your superpower
3.3.5.3.3.
Implementing The Trie Data Structure In Rust
3.3.5.3.4.
Happy little fractals coding the Mandelbrot set in Rust
3.3.5.4.
⭐⭐⭐Rust Polymorphism
❱
3.3.5.4.1.
Rust Polymorphism: Generics and Trait Objects explained
3.3.5.4.2.
Introducing traits in rust: what they are and how to use them
3.3.5.4.3.
Rust Programming for The Object/Function-Oriented Developer
3.3.5.5.
Error & Test
❱
3.3.5.5.1.
⭐⭐️️All About Error Handling in the Rust Programming Language
3.3.5.5.2.
Unit Testing Basics
3.3.5.6.
Iterate
❱
3.3.5.6.1.
Introducing iterators in rust
3.3.5.6.2.
How to implement the intoiterator trait
3.3.5.6.3.
Implementing Iterators in rust & creating a random number generator
3.3.6.
Considering Rust
3.3.7.
Crust Of Rust Series
❱
3.3.7.1.
Async/Await
3.3.7.2.
Atomics and Memory Ordering
3.3.7.3.
Channels
3.3.7.4.
Declarative Macros
3.3.7.5.
Dispatch and Fat Pointers
3.3.7.6.
Functions, Closures and their traits
3.3.7.7.
Iterators
3.3.7.8.
Lifetime Annotations
3.3.7.9.
Smart Pointers And Interior Mutability
3.3.7.10.
Sorting Algorithms
3.3.7.11.
Subtyping and Variance
3.3.7.12.
The Drop Check
3.3.8.
Implementing Hazard Pointers
❱
3.3.8.1.
Part 1
3.3.8.2.
Part 2
3.3.8.3.
Part 3
3.3.8.4.
Part 4
3.3.9.
Open-Source streams
❱
3.3.9.1.
Rust Open Source Contributions Stream
3.3.9.2.
Rust Toos and std::future
3.3.9.3.
Day in the life of Open Source Maintenance 2022-06-19
3.3.9.4.
Day in the life of Open Source Maintenance 2022-10-08
3.4.
Associated Items
❱
3.4.1.
Associated type, Generic associate types
3.4.2.
Associated Types
❱
3.4.2.1.
Associated types examples
3.4.3.
Generic Associated Types
3.4.4.
Associated Functions & Methods
4.
The Rust Programming Language
❱
4.1.
Foreword
4.2.
Introduction
4.3.
Getting Started
❱
4.3.1.
Installation
4.3.2.
Hello, World!
4.3.3.
Hello, Cargo!
4.3.4.
Programming a Guessing Game
4.3.5.
Common Programming Concepts
❱
4.3.5.1.
⚠️Variables and Mutability
4.3.5.2.
Data Types
4.3.5.3.
RBE(Rust by Examples): Expressions and Statements
4.3.5.4.
✨Functions Basic: Statements, Expressions, Last Return, Early Return
4.3.5.5.
Comments
4.3.5.6.
Control Flow
4.3.6.
Understanding Ownership
❱
4.3.6.1.
What is Ownership?
4.3.6.2.
References and Borrowing
4.3.6.3.
The Slice Type
4.3.7.
Using Structs to Structure Related Data
❱
4.3.7.1.
Defining and Instantiating Structs
4.3.7.2.
An Example Program Using Structs
4.3.7.3.
✨Method Syntax
4.3.8.
Enums and Pattern Matching
❱
4.3.8.1.
Defining an Enum
4.3.8.2.
The match Control Flow Construct
4.3.8.3.
Concise Control Flow with if let
4.4.
Basic Rust Literacy
❱
4.4.1.
Managing Growing Projects with Packages, Crates, and Modules
❱
4.4.1.1.
Packages and Crates
4.4.1.2.
Defining Modules to Control Scope and Privacy
4.4.1.3.
Paths for Referring to an Item in the Module Tree
4.4.1.4.
Bringing Paths Into Scope with the use Keyword
4.4.1.5.
Separating Modules into Different Files
4.4.2.
Common Collections
❱
4.4.2.1.
Vectors: Storing Lists of The Same Type of Values
4.4.2.2.
Strings: Storing UTF-8 Encoded Text
4.4.2.3.
HasnMap<K, V>: Storing Keys with Associated Values
4.4.3.
Error Handling
❱
4.4.3.1.
Unrecoverable Errors with panic!
4.4.3.2.
⭐️Recoverable Errors with Result
4.4.3.3.
To panic! or Not to panic!
4.4.4.
Generic Types, Traits, and Lifetimes
❱
4.4.4.1.
✨Generic Data Types
4.4.4.2.
🪐Traits: Defining Shared Behavior
4.4.4.3.
⭐️Validating References with Lifetimes
4.4.5.
Writing Automated Tests
❱
4.4.5.1.
How to Write Tests
4.4.5.2.
Controlling How Tests Are Run
4.4.5.3.
Test Organization
4.4.6.
An I/O Project: Building a Command Line Program
❱
4.4.6.1.
Accepting Command Line Arguments
4.4.6.2.
Reading a File
4.4.6.3.
Refactoring to Improve Modularity and Error Handling
4.4.6.4.
Developing the Library’s Functionality with Test Driven Development
4.4.6.5.
Working with Environment Variables
4.4.6.6.
Writing Error Messages to Standard Error Instead of Standard Output
4.5.
🤔Thinking in Rust
❱
4.5.1.
Functional Language Features: Iterators and Closures
❱
4.5.1.1.
Closures: Anonymous Functions that Capture Their Environment
4.5.1.2.
Processing a Series of Items with Iterators
4.5.1.3.
Improving Our I/O Project
4.5.1.4.
Comparing Performance: Loops vs. Iterators
4.5.2.
More about Cargo and Crates.io
❱
4.5.2.1.
Customizing Builds with Release Profiles
4.5.2.2.
Publishing a Crate to Crates.io
4.5.2.3.
Cargo Workspaces
4.5.2.4.
Installing Binaries from Crates.io with cargo install
4.5.2.5.
Extending Cargo with Custom Commands
4.5.3.
✨Smart Pointers(2+3): (Deref、Drop) + (Box/heap、Rc、RefCell/Reference Cycle)
❱
4.5.3.1.
Two Typical Traits: Deref & Drop
❱
4.5.3.1.1.
Deref(* operator): Treating Smart Pointers Like Regular References with the Deref Trait
4.5.3.1.2.
Drop: Running Code on Cleanup with the Drop Trait
4.5.3.2.
Three main types
❱
4.5.3.2.1.
Heap: Using Box<T> to Point to Data on the Heap
4.5.3.2.2.
References Tracking Pointer Types
❱
4.5.3.2.2.1.
Rc<T>(Reference Counting): single-threaded scenarios, immutable references of multiple owners, the Reference Counted Smart Pointer
4.5.3.2.2.2.
RefCell<T>(reference counting cell): single-threaded scenarios, runtime borrow checking, the Interior Mutability Pattern
4.5.3.2.2.3.
🌟Reference Cycles Can Leak Memory: Mainly from Incorrect Usage of Rc<T> and RefCell<T>
4.5.4.
Fearless Concurrency
❱
4.5.4.1.
Using Threads to Run Code Simultaneously
4.5.4.2.
Using Message Passing to Transfer Data Between Threads
4.5.4.3.
Shared-State Concurrency
4.5.4.4.
Extensible Concurrency with the Sync and Send Traits
4.5.5.
Object Oriented Programming Features of Rust
❱
4.5.5.1.
Characteristics of Object-Oriented Languages
4.5.5.2.
🌛️Using Trait Objects That Allow for Values of Different Types
4.5.5.3.
Implementing an Object-Oriented Design Pattern
4.6.
Advanced Topics
❱
4.6.1.
Patterns and Matching
❱
4.6.1.1.
All the Places Patterns Can Be Used
4.6.1.2.
Refutability: Whether a Pattern Might Fail to Match
4.6.1.3.
⭐️Pattern Syntax
4.6.2.
Advanced Features
❱
4.6.2.1.
Unsafe Rust
4.6.2.2.
⭐️Advanced Traits
4.6.2.3.
✨Advanced Types
4.6.2.4.
📦Advanced Functions and Closures
4.6.2.5.
Macros
4.6.3.
Final Project: Building a Multithreaded Web Server
❱
4.6.3.1.
Building a Single-Threaded Web Server
4.6.3.2.
Turning Our Single-Threaded Server into a Multithreaded Server
4.6.3.3.
Graceful Shutdown and Cleanup
4.6.4.
Appendix
❱
4.6.4.1.
A - Keywords
4.6.4.2.
B - Operators and Symbols
4.6.4.3.
✨️C - Derivable Traits
4.6.4.4.
D - Useful Development Tools
4.6.4.5.
E - Editions
4.6.4.6.
F - Translations of the Book
4.6.4.7.
G - How Rust is Made and “Nightly Rust”
5.
Rust By Examples
❱
5.1.
Hello World
❱
5.1.1.
Comments
5.1.2.
Formatted print
❱
5.1.2.1.
Debug
5.1.2.2.
Display
❱
5.1.2.2.1.
Testcase: List
5.1.2.3.
Formatting
5.2.
Types: Primitives, custom Types, Bindings and Change/Define/Advanced Conversion
❱
5.2.1.
Primitives
❱
5.2.1.1.
Literals and operators
5.2.1.2.
Tuples: a collection of values of different types
5.2.1.3.
Arrays and Slices: a collection of objects of the same type T
5.2.2.
Custom Types: struct and enum
❱
5.2.2.1.
Structures: Tuple, C structs and Unit structs
5.2.2.2.
✨Enums: and Type alias
❱
5.2.2.2.1.
use
5.2.2.2.2.
C-like
5.2.2.2.3.
Testcase: linked-list
5.2.2.3.
constants: const and static
5.2.3.
Variable Bindings
❱
5.2.3.1.
Mutability
5.2.3.2.
Scope ({}) and Shadowing
5.2.3.3.
Declare first
5.2.3.4.
Freezing
5.2.4.
🚶Basic Conversion: Change or Define Types
❱
5.2.4.1.
as: Casting using as keyword
5.2.4.2.
Literals
5.2.4.3.
Inference
5.2.4.4.
✨Type Aliasing: give a new name to an existing type
5.2.5.
💃Advanced Conversion: From/Into trait
❱
5.2.5.1.
From and Into
5.2.5.2.
TryFrom and TryInto: used for fallible conversions, return Result
5.2.5.3.
ToString and FromStr trait: To and from Strings
5.3.
Control: Statements, Functions and Error handling
❱
5.3.1.
✨Expressions: statements end with ;
5.3.2.
🧮 Flow of Control
❱
5.3.2.1.
if/else
5.3.2.2.
while
5.3.2.3.
loop
❱
5.3.2.3.1.
Nesting and labels: a little like lifetime annotations
5.3.2.3.2.
Returning from loops
5.3.2.4.
if let
5.3.2.5.
✨while_let
5.3.2.6.
for and range
5.3.2.7.
⭐️match
❱
5.3.2.7.1.
✨✨✨Destructuring
5.3.2.7.2.
Guards: to filter the arm
5.3.2.7.3.
@ Binding
5.3.3.
✨Functions
❱
5.3.3.1.
Methods
5.3.3.2.
✨Closures
❱
5.3.3.2.1.
Capturing
5.3.3.2.2.
Fn/FnMut/FnOnce
❱
5.3.3.2.2.1.
Type anonymity
5.3.3.2.2.2.
As input parameters
5.3.3.2.2.3.
As output parameters
5.3.3.2.2.4.
Input functions
5.3.3.2.3.
Examples in std
❱
5.3.3.2.3.1.
Iterator::any
5.3.3.2.3.2.
Searching through iterators
5.3.3.3.
Higher Order Functions
5.3.3.4.
✨Diverging functions: return !, different from ()
5.3.4.
⭐️Error handling: Panic、Option and Result
❱
5.3.4.1.
panic!: unrecoverable, try-exception
❱
5.3.4.1.1.
✨abort & unwind: Two implementation mechanisms of panic
5.3.4.2.
Option & unwrap
❱
5.3.4.2.1.
Combinators of Option: map
5.3.4.2.2.
Combinators of Option: and_then
5.3.4.2.3.
Defaults: or, or_else, get_or_insert, 'get_or_insert_with`
5.3.4.3.
Result & OK or ?: A Richer Version Of Option
❱
5.3.4.3.1.
map for Result: catch explicit Exception and Continue
5.3.4.3.2.
Custom Exception: aliases for Result
5.3.4.3.3.
Early returns: Catch Exception and Return
5.3.4.4.
?: the uses of question mark
❱
5.3.4.4.1.
Introducing ?
5.3.4.4.2.
Unpacking options with ? to return the Some or terminate
5.3.4.4.3.
Other uses of ?
5.3.4.5.
Multiple error types to interact
❱
5.3.4.5.1.
Pulling Results out of Options
5.3.4.5.2.
Defining an error type
5.3.4.5.3.
Boxing errors
5.3.4.5.4.
Wrapping errors
5.3.4.6.
Iterating over Results
5.3.4.7.
📒Error Handling Practices -- ChatGPT
❱
5.3.4.7.1.
Basic Practices
5.4.
Encapsulation: Modules, Crates and Cargo
❱
5.4.1.
Modules: hierarchically split and manage visibility
❱
5.4.1.1.
Visibility
5.4.1.2.
Struct visibility: an extra level of visibility with their fields
5.4.1.3.
The use declaration: bind a full path to a new name
5.4.1.4.
super and self: remove ambiguity
5.4.1.5.
File/Directory hierarchy
5.4.2.
Crates: compilation units in Rust, library or binary
❱
5.4.2.1.
Creating a Library: --crate-type=lib
5.4.2.2.
Using a Library: --extern
5.4.3.
Cargo: package management tool
❱
5.4.3.1.
Dependencies
5.4.3.2.
Two Binaries Conventions
5.4.3.3.
✨Tests
5.4.3.4.
Build Scripts
5.5.
Rust Core: Generics, Traits and Scoping
❱
5.5.1.
🪐Generics
❱
5.5.1.1.
Used as Parameter
❱
5.5.1.1.1.
Functions: Identify whether a generic function
5.5.1.1.2.
Impl Type fn: Identify whether a generic method
5.5.1.1.3.
Impl Traits fn: Identify whether a generic method
5.5.1.2.
Bounded by Trait
❱
5.5.1.2.1.
✨Testcase: empty bounds
5.5.1.2.2.
Multiple Trait Bounds
5.5.1.2.3.
Where clauses bounds
5.5.1.3.
New Type Idiom
5.5.1.4.
✨Associated items
❱
5.5.1.4.1.
✨The Problem
5.5.1.4.2.
Associated types
5.5.1.5.
Phantom type parameters
❱
5.5.1.5.1.
Testcase: unit clarification
5.5.2.
🪐Traits
❱
5.5.2.1.
✨Derive Macro Traits
5.5.2.2.
Returning Traits with dyn
5.5.2.3.
Operator Overloading
5.5.2.4.
Drop
5.5.2.5.
Iterators: Iterator Trait
5.5.2.6.
✨impl Trait
5.5.2.7.
Supertraits
5.5.2.8.
Fully Qualified Syntax: Disambiguating overlapping traits
5.5.3.
🪐Scoping rules
❱
5.5.3.1.
RAII
5.5.3.2.
Ownership and moves
❱
5.5.3.2.1.
Mutability
5.5.3.2.2.
Partial moves
5.5.3.3.
Borrowing
❱
5.5.3.3.1.
Mutability
5.5.3.3.2.
Mutable or Immutable, Only One
5.5.3.3.3.
✨The ref pattern
5.5.3.4.
Lifetimes
❱
5.5.3.4.1.
Elision
5.5.3.4.2.
✨Explicit lifetime annotation: another Generic
5.5.3.4.3.
✨Functions、methods、struct、trait
5.5.3.4.4.
Lifetime Bounds for generics
5.5.3.4.5.
Coercion
5.5.3.4.6.
Static
5.6.
Macros: rules! and Attributes
❱
5.6.1.
macro_rules!
❱
5.6.1.1.
Syntax
❱
5.6.1.1.1.
Designators
5.6.1.1.2.
Overload
5.6.1.1.3.
Repeat
5.6.1.2.
DRY (rust_by_example_src/Don't Repeat Yourself)
5.6.1.3.
DSL (rust_by_example_src/Domain Specific Languages)
5.6.1.4.
Variadics
5.6.2.
🧐 Attributes: metadata applied to some module, crate or item
❱
5.6.2.1.
dead_code: disable the unused lint
5.6.2.2.
Crates: : crate_type and crate_name
5.6.2.3.
cfg: Configuration conditional checks
5.6.2.4.
Custom: Custom conditionals
5.7.
Std: Library types and Misc
❱
5.7.1.
⭐️Std library types
❱
5.7.1.1.
✨Box, stack and heap
5.7.1.2.
✨Vectors: re-sizable arrays
5.7.1.3.
✨Strings: String and &str
5.7.1.4.
panic!: Raise Exception , no Catch
5.7.1.5.
Option: catching failure instead of calling panic!
5.7.1.6.
Result: express why an operation failed
5.7.1.7.
?: Chaining Results only match Ok(ok)
5.7.1.8.
HashMap
❱
5.7.1.8.1.
Alternate/custom key types
5.7.1.8.2.
HashSet
5.7.1.9.
Rc: for mutiple ownership, just like what python have done
5.7.1.10.
Arc: shared ownership between threads
5.7.2.
🌌 Std misc
❱
5.7.2.1.
Threads
5.7.2.2.
✨Testcase: map-reduce
5.7.2.3.
Channels: Asynchronous communication between threads
5.7.2.4.
Path
5.7.2.5.
File I/O
❱
5.7.2.5.1.
open: read-only
5.7.2.5.2.
create: write-only
5.7.2.5.3.
read lines: returns an iterator
5.7.2.6.
Child processes
❱
5.7.2.6.1.
Pipes: interaction with the underlying process
5.7.2.6.2.
Wait
5.7.2.7.
std::fs: Filesystem Operations
5.7.2.8.
Program arguments
❱
5.7.2.8.1.
Match to Argument parsing
5.7.2.9.
FFI: Foreign Function Interface
5.8.
Misc: Testing, Unsafe, Compatibility and Meta
❱
5.8.1.
Testing
❱
5.8.1.1.
✨Unit testing for panic: #[cfg(test)], #[test], #[should_panic], #[ignore]
5.8.1.2.
Documentation: cargo doc
5.8.1.3.
⭐️Documentation testing
5.8.1.4.
Integration testing
5.8.1.5.
Dev-dependencies
5.8.2.
Unsafe Operations
5.8.3.
🤔️asm!: Inline assembly in Unsafe
5.8.4.
Compatibility
5.8.5.
Raw identifiers: r#
5.8.6.
Meta
❱
5.8.6.1.
Playground
6.
The PyO3 Guide
❱
6.1.
Getting started
6.2.
Python modules
6.3.
Python functions
❱
6.3.1.
Function signatures
6.3.2.
Error handling
6.4.
Python classes
❱
6.4.1.
Class customizations
❱
6.4.1.1.
Basic object customization
6.4.1.2.
Emulating numeric types
6.4.1.3.
Emulating callable objects
6.5.
Type conversions
❱
6.5.1.
Mapping of Rust types to Python types
6.5.2.
Conversion traits
6.6.
Python exceptions
6.7.
Calling Python from Rust
6.8.
GIL, mutability and object types
6.9.
Parallelism
6.10.
Debugging
6.11.
Features reference
6.12.
Memory management
6.13.
Advanced topics
6.14.
⭐️Building and distribution
❱
6.14.1.
Supporting multiple Python versions
6.15.
Useful crates
❱
6.15.1.
Logging
6.15.2.
Using async and await
6.16.
FAQ and troubleshooting
6.17.
Appendix A: Migration guide
6.18.
Appendix B: PyO3 and rust-cpython
6.19.
Appendix C: Trait bounds
6.20.
Appendix D: Python typing hints
6.21.
CHANGELOG
6.22.
Contributing
Checklist
Light
Rust
Coal
Navy (default)
Ayu
The Rust Programming Language
日不见增 月有渐进 | 唯剃真我 方有成效| 惊涛拍案 千层雪起 |
保持批判,有所取舍 | 知行合一, 方见真我
| 练武不练功 到头一场空 -- 《赛博英雄传》
Checklist