Getting a Little Rusty 🦀

A gentle introduction to reading and understanding Rust code without becoming an expert

What is this?

This is a collection of guides designed for developers who need to read and understand Rust code but don't necessarily need to write production Rust applications. Think of it as a tourist's guide to Rust rather than a citizenship manual.

Whether you're:

  • Reviewing Rust code in pull requests
  • Debugging a Rust service you inherited
  • Understanding Rust examples and documentation
  • Curious about what makes Rust different

...this guide will help you navigate Rust code with confidence.

📚 Table of Contents

  1. Start Here - Your roadmap through these guides
  2. Ownership & Borrowing - Rust's superpower explained with library books 📖
  3. Types & Memory - How Rust thinks about data
  4. Pattern Matching - Reading Rust's Swiss Army knife
  5. Error Handling - No more null pointer exceptions
  6. Traits & Generics - Rust's way of sharing behavior
  7. Lifetimes - Those mysterious 'a annotations explained
  8. Common Patterns - Recognizing idiomatic Rust
  9. Resources - Where to go from here

🎯 Who is this for?

  • You ARE the target audience if:

    • You can read code in languages like Python, JavaScript, Java, or C++
    • You need to understand what Rust code is doing
    • You want quick recognition patterns, not deep theory
    • You prefer analogies over academic explanations
  • You might want something else if:

🚀 Quick Start

  1. New to Rust? Start with 00-start-here.md
  2. Confused by & and mut? Jump to 01-ownership-borrowing.md
  3. Seeing Result<T, E> everywhere? Check 04-error-handling.md
  4. What's with the 'a syntax? Read 06-lifetimes.md

💡 How to Use These Guides

Each guide includes:

  • Analogies to connect Rust concepts to things you already know
  • Quick Recognition boxes to identify patterns at a glance
  • Red Flags 🚩 to spot potential issues
  • Code examples with line-by-line explanations
  • What to look for when reading real Rust code

🔍 What You'll Learn

After reading these guides, you'll be able to:

  • ✅ Understand what Rust code is doing (even complex examples)
  • ✅ Recognize common Rust patterns and idioms
  • ✅ Know what questions to ask during code reviews
  • ✅ Understand Rust error messages
  • ✅ Navigate Rust documentation effectively

You won't become:

  • ❌ A Rust expert (that takes practice!)
  • ❌ Ready to write production Rust code (need more depth)
  • ❌ Familiar with every Rust feature (we skip the esoteric stuff)

📖 Philosophy

This guide follows a few principles:

  1. Analogies over abstractions - We use everyday comparisons
  2. Recognition over memorization - Pattern matching for your brain
  3. Practical over complete - We cover what you'll actually encounter
  4. Gentle slopes - Each concept builds on the previous ones

🤝 Contributing

Found something confusing? Have a better analogy? Spotted an error?

Feel free to open an issue or submit a PR! This guide is meant to help people, and your perspective is valuable.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


Remember: You don't need to master Rust to read Rust. Let's get a little rusty together! 🦀