This repository contains my code implementations and exercises while working through The Rust Programming Language (also known as "The Rust Book").
As I progress through The Rust Book, I'm documenting my learning journey by implementing all the examples, exercises, and projects from each chapter. This repository serves as both a reference for my future self and a resource for others learning Rust.
The repository is organized by chapters from The Rust Book:
Rust_book/
βββ chapter_1/ # Getting Started
βββ chapter_2/ # Programming a Guessing Game
βββ chapter_3/ # Common Programming Concepts
βββ ...
Each chapter directory contains:
- Code examples from the book
- Exercise solutions
- Personal notes and experiments
- Mini-projects related to the chapter's concepts
- Chapter 1: Getting Started
- Chapter 2: Programming a Guessing Game
- Chapter 3: Common Programming Concepts
- Chapter 4: Understanding Ownership
- Chapter 5: Using Structs
- Chapter 6: Enums and Pattern Matching
- And more to come...
Each chapter contains independent Rust projects. To run any example:
cd chapter_X/project_name
cargo runTo run tests:
cargo test- Rust and Cargo (install from rustup.rs)
- Basic understanding of programming concepts
- The Rust Programming Language Book
- Rust Documentation
- Rust by Example
- Rustlings - Small exercises to get you used to reading and writing Rust code
I update this repository regularly as I complete each chapter. Feel free to:
- β Star this repo if you find it helpful
- π Open an issue if you spot any mistakes
- π‘ Suggest improvements or alternative approaches
Masir Jafri
I am Masir Jafri, a second year computer science grad who loves exploring new tech. Currently I am more into generative and Agentic AI. If you find this helpful drop a star and if you wanna connect me then below are my socials:
- Portfolio Website: MasirJafri
- GitHub: @MasirJafri1
- Email: masirjafri1@gmail.com
- LinkedIn: @MasirAbbas Jafri
- Hashnode: @MasirJafri
This project is open source and available for educational purposes. The code examples are based on The Rust Programming Language book.
Note: This is a learning repository. The code here represents my understanding at the time of writing and may not always reflect best practices. Feedback and suggestions are always welcome!