Learn Rust
A comprehensive guide from installation to advanced patterns. Bilingual — hover or tap any paragraph to reveal Vietnamese translation.
What you'll learn
Memory Safety
Eliminate null pointers and data races at compile time
Zero-cost Abstractions
High-level code that compiles to bare-metal performance
Fearless Concurrency
Concurrent programming without data races, by design
Modern Ecosystem
Cargo, crates.io, and a thriving open source community
Ownership
Rust's unique memory management model
Mô hình quản lý bộ nhớ độc đáo của Rust
References & Borrowing
References, borrowing rules, and slices
Tham chiếu, quy tắc mượn và slice
Structs
Custom data types with methods
Kiểu dữ liệu tùy chỉnh với phương thức
Enums & Pattern Matching
Enums, Option, Result, and match
Enum, Option, Result và match
Error Handling
Result, Option, and the ? operator
Result, Option và toán tử ?
Collections
Vec, String, and HashMap
Vec, String và HashMap
Generics & Traits
Polymorphism and abstraction in Rust
Đa hình và trừu tượng trong Rust
Lifetimes
Lifetime annotations and elision rules
Chú thích thời gian sống và quy tắc bỏ qua
Closures & Iterators
Functional programming patterns
Các mẫu lập trình hàm
Smart Pointers
Box, Rc, Arc, and RefCell
Box, Rc, Arc và RefCell
Concurrency
Threads, channels, and shared state
Luồng, kênh và trạng thái chia sẻ
Async/Await
Asynchronous programming with Tokio
Lập trình bất đồng bộ với Tokio
Macros
Declarative and procedural macros
Macro khai báo và macro thủ tục
Testing
Unit, integration, and doc tests
Kiểm thử đơn vị, tích hợp và tài liệu
Cargo & Ecosystem
Package management and popular crates
Quản lý gói và các crate phổ biến
Unsafe Rust
Raw pointers, unsafe functions, and FFI
Con trỏ thô, hàm không an toàn và FFI