This repository contains a series of Rust example projects that demonstrate fundamental and intermediate concepts in Rust programming. Each folder is numbered to indicate a progressive learning path.
| Folder | Description |
|---|---|
1_hello |
Basic "Hello, world!" program – your first Rust app |
2_functions |
Functions and basic parameter/return usage |
3_simple_types |
Primitive data types and operations |
4_control_flow |
If/else, match, and basic control structures |
5_string_example |
String manipulations and methods |
6_control_flow_strings |
Combined string operations with control flow |
7_ownership_example |
Understanding Rust's ownership system |
8_ownership_references |
References and borrowing rules |
9_struct_and_traits_example |
Using structs and implementing traits |
10_structs_traits |
Advanced trait usage and composition |
11_collection_example |
Working with collections: Vec, HashMap, etc. |
12_enum_example |
Basic usage of enums and pattern matching |
13_collections_enum_example |
Mixing collections and enums for richer logic |
14_closure_example |
Closures and capturing environment |
15_thread_example |
Basic multithreading with std::thread |
16_thread_closure_example |
Using closures in multithreaded contexts |
invaders |
A game project (likely based on the Invaders tutorial) |
LICENSE |
MIT License file |
- Rust
- A code editor like VS Code or IntelliJ Rust
- To run a specific example:
cd <example_folder>
cargo run