Bitterless Rust
A Rust tutorial that brutally cuts out advanced explanations. Full of oversimplifications, but you'll write working code.
Chapters 12
- IntroductionAbout this tutorial
- Getting Started with CargoBasic operations with Rust's build tool Cargo
- Variables and Typeslet, mut, and 3 numeric types
- Functions and Control Flowfn, if, match, for, and the expression-based world
- Structs and EnumsCreating data types with struct, enum, and impl
- The Dynamic OnesVec, String, and the "just clone it" approach
- Option and Result"Something or nothing" and "success or failure"
- Practice: Parse and Display a NumberThe first step toward building a calculator. Reading a number from a string
- Practice: AdditionMaking "1 + 2" work
- Practice: SubtractionAdding subtraction the same way we added addition
- Practice: Multiplication and DivisionAll four operations are in. But there's a precedence problem...
- Practice: Operator Precedence and Finishing UpMaking multiplication compute first. Adding parentheses to finish the calculator