This repository contains the code I wrote while working through the excellent Rust Programming Language book. I recently completed the tutorial, and I wanted to document my experience and summarize what I learned.
Going through the book was realy interesting introduction to Rust. Some of the key concepts I grasped include:
- Memory Safety: Rust's ownership system and borrow checker enforce memory safety at compile time, preventing common errors like dangling pointers, data races, and buffer overflows.
- The Rust Compiler: The compiler is incredibly helpful, providing clear and informative error messages that guide you towards correct code. It felt like having a helpful mentor constantly pointing out potential issues.
- Threads: I explored Rust's concurrency features, learning how to create and manage threads safely and efficiently. The ownership system plays a crucial role here, preventing data races and ensuring thread safety.
- Basic Syntax and Concepts: Of course, I also learned the fundamentals of Rust syntax, data types, control flow, structs, enums, traits, and more.
Working through the Rust book was a fun and rewarding experience. The concepts were challenging but also very satisfying to learn. I especially appreciate the focus on memory safety and the power of the compiler. I'm excited to continue exploring Rust and build more complex projects with it.
This repository is organized to mirror the structure of the book, with each chapter's exercises and examples in their respective directories.
To run the code in this repository, you'll need to have Rust installed. You can download and install it from https://www.rust-lang.org/tools/install.
Once you have Rust installed, you can navigate to a specific project directory and run it using the following command:
cargo run