AnyCompiler

Free · No signup

Rust Tutorial

Learn Rust from the ground up. Every code example on every lesson is real and runnable — the output shown was captured from an actual execution on this site's own compiler, not typed by hand — and you can try each one yourself with one click.

  1. 1Introduction to Rust
  2. 2Your First Rust Program
  3. 3Variables and Mutability
  4. 4Basic Types
  5. 5Ownership
  6. 6References and Borrowing
  7. 7Strings and Slices
  8. 8Structs
  9. 9Enums and Pattern Matching
  10. 10Option and Result
  11. 11Functions
  12. 12Control Flow
  13. 13Vectors
  14. 14Iterators and Closures
  15. 15Traits
  16. 16Generics
  17. 17Error Handling
  18. 18Collections and the Standard Library

More lessons are added regularly. Want to practice outside the tutorial? Open the Rust compiler. Prefer TypeScript? Read the TypeScript tutorial. Prefer JavaScript? Read the JavaScript tutorial. Prefer Python? Read the Python tutorial. Prefer C? Read the C tutorial. Prefer Hindi? Hindi mein padhein. Prefer Urdu? Roman Urdu mein parhein. ¿Prefieres español? Leer en español.