Skip to content

About

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Rust Learning (Rust From Scratch)

Ownership, traits, and fearless concurrency for engineers who already know Java, Python, or Go.
GitHub: saurabhahuja71/Rust-learning
Sister repo: ruby-from-scratch · Path hub: learning-path
Track map & comparisons: learning-path/tracks/ruby-and-rust

Rust is the language that refuses to let your bugs ship. There is no GC, no data races in safe code, and a compiler that reads like a pedantic senior pair-programmer.

This curriculum assumes you already know how to program. We spend our energy on ownership, traits, Result/Option, iterators, async, and smart pointers — the concepts that feel alien coming from GC languages.


Prerequisites

  • Comfortable in Java, Python, Go, or similar
  • Terminal + Git + editor with rust-analyzer recommended
  • See 00-setup/rust-setup.md

How to use this repository

  1. Complete setup (rustup, cargo)
  2. Chapters in order — ownership first is non-negotiable
  3. Type examples; read every compiler error
  4. Exercises before solutions/
  5. Ship a project from projects/

Suggested pace

Pace Schedule
Intensive 1 chapter/day; re-read ownership if needed (~2–3 weeks)
Steady Ownership week + one chapter every 2–3 days (~5 weeks)
After Ruby Follow hub Option A

Table of contents

# Chapter Run
0 Setup rustc --version
1 Ownership & borrowing cargo run in chapter examples
2 Structs, enums, match cargo run
3 Traits & generics cargo run
4 Result & Option cargo run
5 Collections & iterators cargo run
6 Concurrency & async cargo run
7 Smart pointers & memory cargo run
P Projects cargo run per project

Learning path link

→ learning-path · Ruby & Rust track
→ Hub home: saurabhahuja71/learning-path

Compare with Ruby: ruby-from-scratch


How to run examples

Each chapter with code has a small Cargo project under examples/ or is a multi-bin crate.

# Ownership chapter
cd 01-ownership-and-borrowing/examples
cargo run --bin move_semantics
cargo run --bin borrowing

# Projects
cd projects/cli-todo && cargo run -- list
cd projects/grep-lite && cargo run -- error Cargo.toml
cd projects/async-fetcher && cargo run

Edition: 2021 (compatible with newer editions as they stabilize). Prefer a recent stable toolchain (1.70+).


Repository layout

rust-from-scratch/
├── README.md
├── 00-setup/
├── 01-ownership-and-borrowing/ … 07-smart-pointers-and-memory/
├── projects/
├── solutions/
└── .gitignore

Contribution

See CONTRIBUTING.md.

Author

Saurabh Ahuja (@saurabhahuja71)

License

MIT

About

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages