开源 · 免费 · 中英双语

Open-source · Free · Bilingual

通过实例,
真正学会 Rust
Learn Rust for real,
through examples

一本从零开始的系统性 Rust 教程。16 章完整路径,从变量、所有权到并发、Web 与部署,每章都用可运行的示例和练习带你上手。 A systematic Rust tutorial that starts from zero. A complete 16-chapter path — from variables and ownership to concurrency, web, and deployment — every chapter driven by runnable examples and exercises.

fn main() {
    let greet = "你好,Rust!";
    println!("{greet}");
    // 从第一个可运行示例开始
}
Learn Rust through Examples — 通过实例学习 Rust

为什么选这本书 Why this book

实例驱动

Example-driven

不堆砌概念,每章先给最小可运行代码,再解释原理与陷阱,动手即懂。

No concept-dumping. Each chapter starts with the smallest runnable code, then explains the why and the pitfalls.

中英双语

Bilingual

同一套专业内容提供中文与英文两版,互为参照,方便对照学习。

The same curated content ships in both Chinese and English, cross-referenceable.

系统路径

Structured path

从概览到部署共 16 章,循序渐进,每章都有练习巩固。

16 chapters from overview to deployment, paced progressively with exercises in every chapter.

开源免费

Free & open

基于 mdBook 构建,源码开放,任何人可免费阅读、 fork 与贡献。

Built with mdBook and fully open-source — read, fork, and contribute for free.

16 章完整学习路径 The 16-chapter path

  1. 01Rust 概览Overview
  2. 02变量、类型与控制流Variables, Types & Control Flow
  3. 03所有权与借用Ownership & Borrowing
  4. 04结构体与枚举Structs & Enums
  5. 05泛型与特征Generics & Traits
  6. 06错误处理Error Handling
  7. 07集合Collections
  8. 08模块系统Modules
  9. 09并发编程Concurrency
  10. 10网络编程Networking
  11. 11数据库操作Databases
  12. 12Web 开发Web Development
  13. 13性能优化Performance
  14. 14安全编程Security
  15. 15测试与调试Testing & Debugging
  16. 16部署与运维Deployment & Ops

关于本书 About the book

《Learn Rust through Examples》由 lihongchao 使用 mdBook 编写,面向想系统掌握 Rust 的开发者。内容覆盖语言基础到生产实践,并配有可运行的示例与章节练习。

项目采用开源许可证,欢迎通过 Issue 与 Pull Request 参与贡献。

"Learn Rust through Examples" is written by lihongchao with mdBook, for developers who want a systematic grip on Rust — from language fundamentals to production practice, with runnable examples and chapter exercises.

Released under an open-source license. Issues and pull requests are welcome.

  • 作者:Author: lihongchao
  • 语言:Language: 中文 / English
  • 许可证:License: 开源(见 LICENSE)
  • 构建:Built with: mdBook

现在就开始

Start now

选择你的语言,立即免费阅读。

Pick your language and start reading for free.

阅读中文版 → Read in English →