สรุป 🎉
ยินดีด้วย! คุณจบคอร์ส Rust แล้ว!
คุณได้เรียนรู้ภาษา Rust จากพื้นฐานจนถึงขั้นสูง และสร้าง CLI application ที่ใช้งานได้จริง!
สิ่งที่คุณได้เรียนรู้
Part 1: พื้นฐาน (บทที่ 1-4)
| บท | หัวข้อ | Key Concepts |
|---|---|---|
| 1 | Getting Started | Installation, Cargo, Hello World |
| 2 | Variables | Mutability, Data Types, Constants |
| 3 | Functions | Parameters, Return Values, Expressions |
| 4 | Control Flow | If/Else, Loops, Match |
Part 2: Core Concepts (บทที่ 5-9)
| บท | หัวข้อ | Key Concepts |
|---|---|---|
| 5 | Ownership | The 3 Rules, Move, Clone, References |
| 6 | Structs | Defining, Methods, Associated Functions |
| 7 | Enums | Option, Result, Pattern Matching |
| 8 | Collections | Vec, String, HashMap |
| 9 | Error Handling | panic!, Result, ? Operator |
Part 3: Advanced (บทที่ 10-14)
| บท | หัวข้อ | Key Concepts |
|---|---|---|
| 10 | Generics & Traits | Type Parameters, Trait Bounds, Lifetimes |
| 11 | Modules | Packages, Crates, Visibility |
| 12 | Testing | Unit Tests, Integration Tests, Doc Tests |
| 13 | Iterators & Closures | Adapters, Consumers, Fn Traits |
| 14 | Smart Pointers | Box, Rc, RefCell, Weak |
Part 4: Systems Programming (บทที่ 15-18)
| บท | หัวข้อ | Key Concepts |
|---|---|---|
| 15 | Concurrency | Threads, Channels, Mutex, Arc |
| 16 | Async/Await | Futures, Tokio, select! |
| 17 | Unsafe | Raw Pointers, FFI, Safe Abstractions |
| 18 | Macros | Declarative, Procedural, Built-in |
Part 5: Real World (บทที่ 19-20)
| บท | หัวข้อ | Key Concepts |
|---|---|---|
| 19 | Web Development | Axum, REST API, SQLx |
| 20 | Final Project | CLI App Design & Implementation |
Key Skills คุณได้
// 1. Memory safety without GC
let s1 = String::from("hello");
let s2 = &s1; // Borrowing
// 2. Error handling
fn read_file() -> Result<String, Error> {
let content = std::fs::read_to_string("file.txt")?;
Ok(content)
}
// 3. Zero-cost abstractions
let sum: i32 = vec![1, 2, 3]
.iter()
.map(|x| x * 2)
.filter(|x| x > &2)
.sum();
// 4. Fearless concurrency
std::thread::spawn(move || {
println!("Running in parallel!");
});
โปรเจกต์ที่ควรลองทำต่อ
Beginner Projects
- Guessing Game - Text-based number guessing
- Temperature Converter - Fahrenheit ↔ Celsius
- Todo List - CLI task manager (บทนี้!)
Intermediate Projects
- Markdown Parser - Convert MD to HTML
- HTTP Client - Simple
curlclone - File Searcher - Like
grepcommand
Advanced Projects
- REST API Server - Full CRUD with database
- Async Crawler - Web scraper with Tokio
- Chat Server - Real-time with WebSockets
- Compiler - Simple expression language
Resources สำหรับเรียนต่อ
ดูรายละเอียดเพิ่มเติมที่ � Appendix: Resources
☕ สนับสนุนผู้เขียน
ขอบคุณที่อ่านจนจบครับ! ถ้าหนังสือเล่มนี้มีประโยชน์ คุณสามารถเลี้ยงกาแฟผมเพื่อเป็นกำลังใจในการทำคอนเทนต์ดีๆ ต่อไปได้ที่:
Final Tips
- อ่าน Error Messages - Rust มี error messages ที่ดีมาก
- ใช้ Clippy -
cargo clippyหา improvements - Format Code -
cargo fmtจัด format อัตโนมัติ - Write Tests -
cargo testทดสอบ code - Read Documentation -
cargo doc --open
ขอบคุณที่เรียนกับเรา! 🦀
_~^~^~_
\) / o o \ (/
'_ ∿ _'
/ '-----' \
Happy Coding!
Rust makes systems programming accessible to everyone.
ขอให้โชคดีกับการเขียน Rust!