Saltar a contenido

00 - Introduction

What this session is

A 10-minute read. No code yet. Sets expectations honestly.

What you're going to build, eventually

By the end of this path:

  • Written and run small Rust programs.
  • Built a little command-line tool.
  • Written tests for your own code.
  • Cloned a real Rust open-source project, browsed it, run its tests, understood roughly what it does.
  • Submitted a small fix as a pull request.

That last point is the goal.

The deal

It's slow on purpose. One concept per page.

It assumes nothing. Every word defined inline.

You have to type the code. Reading without typing doesn't stick.

You will be confused. Often. More than with other languages. Rust has a steep ramp because it asks you to think about memory ownership - something Python, Java, Go all hide. Once you've internalized it, you write code that the compiler proves correct, which is its own kind of magic. The first 6 weeks are the worst; it gets better.

The Rust honesty section

Things you should know going in:

  • The borrow checker will reject code that looks fine. This is a feature. The error messages take time to learn to read. The first month is humbling. You'll have moments of "I just wanted to put this in a list, why is the compiler shouting at me." This is normal. Don't quit.

  • Compile times are slower than Go/Python. A medium Rust project takes minutes to build cold, tens of seconds incremental. Tooling has improved (incremental compilation, sccache); it's still slower than you'd like.

  • There are concepts here that don't exist in other languages. Lifetimes. The distinction between &str and String. Move semantics. Traits as constraints, not interfaces. We'll meet them gently.

  • The reward is real. Programs that pass cargo check are usually correct. There's a class of bugs (memory unsafety, data races) that compile errors prevent up front. Your CI and your debugging both get shorter.

What you need

  • A computer (any OS).
  • A text editor - VS Code with the rust-analyzer extension is the standard. Free.
  • A terminal.
  • ~5 hours/week. Path is sized for 4-6 months.
  • Patience. Real patience. Maybe slightly more than you've allocated.

What you do NOT need

  • A C/C++ background. (It helps; not required.)
  • A computer-science degree.
  • To be "smart enough for Rust." Nobody finds the borrow checker easy at first.
  • To know any other language first.

How long this realistically takes

4 to 6 months at 5 hours/week to "submit a pull request." The slow page is page 06 (ownership). Plan to spend an extra week there.

What success looks like

You'll be able to: - Open a Rust file and read it. - Open a Rust project on GitHub and tell me in two paragraphs what it does. - Find a small bug or missing feature and fix it. - Submit the fix as a PR matching the project's style.

You will not be able to: - Write a kernel module. - Tell people you're "a Rust expert." (Years of work past this.)

A note on safe vs unsafe

Rust has an escape hatch: the unsafe keyword. Inside unsafe { ... } blocks, you can do things the borrow checker can't verify (dereference raw pointers, call C functions, etc.). About 95%+ of all Rust code is safe Rust - no unsafe needed. We will not cover unsafe in this beginner path. You may meet it when reading low-level libraries; treat it as "the author is taking responsibility for the safety the compiler can't check here."

One last thing

If a page feels too dense, stop and re-read. If still too dense, that's a page bug - note, skip, come back.

Ready? Next: Setup →

Comments