Skip to content

Commit d220c31

Browse files
committed
Enhance README with detailed introduction, repository structure, learning goals, and resources for Rust and Python integration
1 parent 2ebae14 commit d220c31

1 file changed

Lines changed: 121 additions & 1 deletion

File tree

README.md

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,121 @@
1-
# rust-practice-2025
1+
# rust-practice-2025
2+
3+
## Introduction
4+
5+
This repository is a personal learning journey through the Rust programming language. The primary goal is to build proficiency in Rust fundamentals, syntax, and best practices. A secondary objective is to explore integrating Rust with Python, enabling high-performance extensions and interoperability between the two languages.
6+
7+
The repository is organized by day/topic, with each directory containing practical examples and exercises that progressively build understanding of Rust concepts.
8+
9+
## Repository Structure
10+
11+
- `day1/` - Hello World and basic project setup
12+
- `day2/` - Data types (primitive and compound)
13+
- `day3/` - Functions
14+
- _(Additional days will be added as learning progresses)_
15+
16+
## Learning Goals
17+
18+
- Master Rust fundamentals: ownership, borrowing, lifetimes
19+
- Understand Rust's type system and memory safety guarantees
20+
- Build proficiency with Rust's tooling (Cargo, rustc, rustfmt, clippy)
21+
- Explore systems programming concepts
22+
- Learn Rust-Python interoperability using PyO3 or similar tools
23+
24+
## Rustlings: Interactive Learning
25+
26+
[Rustlings](https://github.com/rust-lang/rustlings/) is a collection of small, focused exercises designed to teach Rust through hands-on practice. It's an official Rust project that helps you learn by reading, writing, and fixing Rust code.
27+
28+
### What is Rustlings?
29+
30+
Rustlings provides bite-sized exercises that start simple and gradually increase in complexity. Each exercise is a small Rust program with intentional errors or missing code that you need to fix. The exercises cover core Rust concepts including:
31+
32+
- Variables and mutability
33+
- Functions and control flow
34+
- Data types and structures
35+
- Ownership, borrowing, and lifetimes
36+
- Error handling
37+
- Traits and generics
38+
- Testing and much more
39+
40+
### How to Use Rustlings
41+
42+
1. **Installation**:
43+
```bash
44+
curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash
45+
```
46+
47+
Or with Cargo:
48+
```bash
49+
cargo install rustlings
50+
```
51+
52+
2. **Getting Started**:
53+
```bash
54+
rustlings init
55+
cd rustlings
56+
rustlings watch
57+
```
58+
59+
3. **Working Through Exercises**:
60+
- Run `rustlings watch` - it will automatically check your solutions as you save files
61+
- Open exercises in your editor (located in the `exercises/` directory)
62+
- Read the instructions and hints in each file
63+
- Fix the code to make the tests pass
64+
- Use `rustlings hint <exercise_name>` if you get stuck
65+
- Progress through exercises sequentially or jump to specific topics
66+
67+
4. **Key Commands**:
68+
- `rustlings watch` - Auto-check solutions as you work
69+
- `rustlings verify` - Check all exercises at once
70+
- `rustlings run <exercise_name>` - Run a specific exercise
71+
- `rustlings hint <exercise_name>` - Get a hint for an exercise
72+
- `rustlings list` - Show all exercises and their status
73+
74+
### Why Rustlings?
75+
76+
- **Learn by doing**: Active practice reinforces concepts better than passive reading
77+
- **Immediate feedback**: The watch mode provides instant feedback on your solutions
78+
- **Structured progression**: Exercises build on each other logically
79+
- **Complements The Book**: Works perfectly alongside reading The Rust Programming Language
80+
- **Low commitment**: Each exercise takes just a few minutes, perfect for quick learning sessions
81+
82+
## References
83+
84+
### Official Rust Resources
85+
86+
- **[The Rust Programming Language Book](https://doc.rust-lang.org/book/)** - The official book for learning Rust, also known as "The Book"
87+
- **[Rust by Example](https://doc.rust-lang.org/rust-by-example/)** - A collection of runnable examples illustrating various Rust concepts
88+
- **[Rustlings](https://github.com/rust-lang/rustlings/)** - Small exercises to get you used to reading and writing Rust code
89+
- **[Rust Standard Library Documentation](https://doc.rust-lang.org/std/)** - Comprehensive documentation for the standard library
90+
91+
### Additional Learning Resources
92+
93+
- **[The Cargo Book](https://doc.rust-lang.org/cargo/)** - Learn about Rust's package manager and build system
94+
- **[Rust Language Cheat Sheet](https://cheats.rs/)** - Quick reference for Rust syntax and concepts
95+
- **[Rust Cookbook](https://rust-lang-nursery.github.io/rust-cookbook/)** - A collection of simple examples demonstrating good practices
96+
- **[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/)** - Guide to async/await in Rust
97+
98+
### Rust-Python Integration
99+
100+
- **[PyO3](https://pyo3.rs/)** - Rust bindings for Python, enabling Rust extensions for Python
101+
- **[maturin](https://www.maturin.rs/)** - Build and publish Rust-based Python packages
102+
- **[rust-cpython](https://github.com/dgrunwald/rust-cpython)** - Alternative Rust bindings for Python
103+
104+
### Community and Tools
105+
106+
- **[Rust Playground](https://play.rust-lang.org/)** - Try Rust in your browser
107+
- **[This Week in Rust](https://this-week-in-rust.org/)** - Weekly newsletter about Rust updates
108+
- **[Rust Users Forum](https://users.rust-lang.org/)** - Community discussion forum
109+
- **[r/rust on Reddit](https://www.reddit.com/r/rust/)** - Rust community on Reddit
110+
111+
## Progress Tracking
112+
113+
| Day | Topic | Status |
114+
|-----|-------|--------|
115+
| Day 1 | Hello World, Project Setup | ✅ Complete |
116+
| Day 2 | Data Types | ✅ Complete |
117+
| Day 3 | Functions | ✅ Complete |
118+
119+
---
120+
121+
*Last updated: November 23, 2025*

0 commit comments

Comments
 (0)