Turn on watercolor background effects.* May affect performance, battery life, and temperature on some devices.

Bitterless Rust

A Rust tutorial that brutally cuts out advanced explanations. Full of oversimplifications, but you'll write working code.

Chapters 12

  1. IntroductionAbout this tutorial#introduction
  2. Getting Started with CargoBasic operations with Rust's build tool Cargo#cargo#setup
  3. Variables and Typeslet, mut, and 3 numeric types#variables#types
  4. Functions and Control Flowfn, if, match, for, and the expression-based world#functions#control-flow
  5. Structs and EnumsCreating data types with struct, enum, and impl#struct#enum
  6. The Dynamic OnesVec, String, and the "just clone it" approach#vec#string#ownership#clone
  7. Option and Result"Something or nothing" and "success or failure"#option#result#error-handling
  8. Practice: Parse and Display a NumberThe first step toward building a calculator. Reading a number from a string#lexer#practice
  9. Practice: AdditionMaking "1 + 2" work#parser#ast#practice
  10. Practice: SubtractionAdding subtraction the same way we added addition#parser#practice
  11. Practice: Multiplication and DivisionAll four operations are in. But there's a precedence problem...#parser#practice
  12. Practice: Operator Precedence and Finishing UpMaking multiplication compute first. Adding parentheses to finish the calculator#parser#precedence#repl#practice
← Back to all books