Writing Rust in Easy English
Rust in Easy English was written from July to August 2020, and is over 400 pages long. You can contact me here or on LinkedIn or on Twitter if you have any questions. If you see anything wrong or have a pull request to make, go ahead. Over 20 people have already helped out by fixing typos and problems in the code, so you can too. I'm not the world's best Rust expert so I always like to hear new ideas or see where I can make the book better.
- Part 1 - Rust in your browser
- Rust Playground
- 🚧 and ⚠️
- Comments
- Types
- Type inference
- Printing 'hello, world!'
- Display and debug
- Mutability (changing)
- The stack, the heap, and pointers
- More about printing
- Strings
- const and static
- More on references
- Mutable references
- Giving references to functions
- Copy types
- Collection types
- Vectors
- Tuples
- Control flow
- Structs
- Enums
- Loops
- Implementing structs and enums
- Destructuring
- References and the dot operator
- Generics
- Option and Result
- Other collections
- The ? operator
- Traits
- Chaining methods
- Iterators
- Closures
- The dbg! macro and .inspect
- Types of &str
- Lifetimes
- Interior mutability
- RefCell
- Mutex
- RwLock
- Cow
- Type aliases
- The todo! macro
- Rc
- Multiple threads
- Closures in functions
- impl Trait
- Arc
- Channels
- Reading Rust documentation
- Attributes
- Box
- Box around traits
- Default and the builder pattern
- Deref and DerefMut
- Crates and modules
- Testing
- External crates
- A tour of the standard library
- Writing macros
- Part 2 - Rust on your computer
Part 1 - Rust in your browser
This book has two parts. In Part 1, you will learn as much Rust as you can just in your browser. You can actually learn almost everything you need to know without installing Rust, so Part 1 is very long. Then at the end is Part 2. It is much shorter, and is about Rust on your computer. That's where you will learn everything else you need to know that you can only do outside of a browser. Some examples are: working with files, taking user input, graphics, and personal settings. Hopefully, by the end of Part 1 you will like Rust enough that you will install it. And if you don't, no problem - Part 1 teaches you so much that you won't mind.