Bạn muốn tìm hiểu về Rust nhưng không biết bắt đầu từ đâu! Quyển sách này là điểm khởi đầu tốt nhất, quyển sách sẽ giới thiệu với các bạn những kiến thức cơ bản trong Rust, từ đơn giản cho đến phức tạp. Những kiến thức trong đây được trình bày hết sức đơn giản, dễ hiểu, rất thích hợp cho những bạn đang bắt đầu tìm hiểu về Rust.
Rust Vietnam không trực tiếp viết ra quyển sách, nhưng Rust Vietnam sẽ thực hiện việc Việt hoá quyển sách này, để giúp các bạn có cách tiếp cận tốt nhất đối với Rust.
-
Guessing Game Tutorial -
Common Programming ConceptsVariables and MutabilityData TypesHow Functions WorkCommentsControl Flow
-
Understanding OwnershipWhat is Ownership?References & BorrowingSlices
-
StructsMethod Syntax
-
EnumsOptionMatchif let
-
Modulesmod
and the FilesystemControlling Visibility withpub
Importing Names withuse
-
Fundamental Collections- Vectors
StringsHash Maps
-
Error HandlingUnrecoverable Errors withpanic!
Recoverable Errors withResult
Topanic!
or Not Topanic!
-
GenericsSyntaxTraitsLifetime syntax
-
TestingWriting testsRunning testsTest Organization
-
I/ORead
&Write
std::fs
std::path
std::env
-
CompositionInstead of InheritanceTrait Objects?
-
Creating a LibraryCargoCrates.ioOrganizing your Public APIDocumentationWorkspaces and Multiple Related Crates
-
Closures -
Zero-cost AbstractionsIterators as a Case Study
-
Smart PointersBox<T>
Rc<T>
Cell
RefCell
Interior Mutability
-
ConcurrencyThreadsSend
&Sync
Arc<T>
Mutex<T>
Channels
-
Patterns -
More Lifetimes -
Unsafe RustRaw Pointerstransmute
-
Foreign Function InterfaceConditional CompilationBindings to CUsing Rust from Other Languagesstatic
-
Advanced Type System FeaturesAssociated TypesTrait ObjectsUFCSCoherence
-
MacrosWriting Your Own Macros
-
Nightly RustNightly FeaturesHow to Find Out About Nightly Features
-
AppendixKeywordsOperatorsDerivable Traits
Chúng tôi sẽ rất vui nếu bạn giúp chúng tôi Việt hoá một chapter hay là sửa một lỗi nhỏ về ngữ pháp, bất kỳ lỗi nào bạn tìm thấy thì đừng ngại tạo một Pull request. Để có thể xem được phiên bản ebook offline thì bạn cần làm các bước sau:
- Clone project:
$ git clone https://github.com/rust-vietnam/book
- Vì ebook này được xây dựng bằng mdBook, nên cần install:
$ cargo install mdbook
- Serve project :
mdbook serve
- Tiến hành Việt hoá hoặc tìm lỗi.
- Tiến hành build ebook:
$ mdbook build
. Mặc định sau khi build thì content sẽ nằm trong folderbook
- Review lại một lần nửa:
$ open -a "Firefox" book/index.html # OS X
hoặc$ open -a "Google Chrome" book/index.html # OS X
. Nếu bạn dùngWindow
bạn có thể mở folderbook
và duple click vào fileindex.html
để xem nội dung ebook. - Tạo PR.
Ngay sau khi bạn tạo PR chúng tôi đã xây dựng 1 người giúp việc CI
để tự động kiểm tra lại bạn có sai sót nhỏ gì không ?
Đừng lo lắng bạn có thể xem lại công việc của người giúp việc CI đã thực hiện.
Bạn sẽ thấy status hiện tại của CI, nếu green, xin chúc mừng chúng tôi sẽ review lại và sẽ accept PR của bạn, việc này sẽ mất
từ 2-3 tiếng. Ngay sau khi merge thì PR của bạn sẽ xuất hiện trên trang chủ Ebook: Ngôn ngữ lập trình Rust.