You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

228 lines
10 KiB

3 years ago
# Rust语言圣经
3 years ago
3 years ago
[Rust语言圣经](about-book.md)
[进入Rust编程世界](into-rust.md)
3 years ago
## Getting started
3 years ago
- [寻找牛刀,以便小试](first-try/intro.md)
- [安装Rust环境](first-try/installation.md)
- [墙推VSCode!](first-try/editor.md)
3 years ago
- [认识Cargo](first-try/cargo.md)
3 years ago
- [不仅仅是Hello world](first-try/hello-world.md)
3 years ago
3 years ago
## Rust学习三部曲
3 years ago
- [Rust基础入门](basic/intro.md)
- [变量绑定与解构](basic/variable.md)
3 years ago
- [基本类型](basic/base-type/index.md)
- [数值类型](basic/base-type/numbers.md)
3 years ago
- [字符、布尔、元类型](basic/base-type/char-bool.md)
- [语句与表达式](basic/base-type/statement-expression.md)
3 years ago
- [函数](basic/base-type/function.md)
3 years ago
- [所有权和借用](basic/ownership/index.md)
- [所有权](basic/ownership/ownership.md)
- [引用与借用](basic/ownership/borrowing.md)
3 years ago
- [复合类型](basic/compound-type/intro.md)
3 years ago
- [字符串与切片](basic/compound-type/string-slice.md)
3 years ago
- [元组](basic/compound-type/tuple.md)
3 years ago
- [结构体](basic/compound-type/struct.md)
3 years ago
- [枚举](basic/compound-type/enum.md)
- [数组](basic/compound-type/array.md)
- [流程控制](basic/flow-control.md)
- [模式匹配](basic/match-pattern/intro.md)
- [match和if let](basic/match-pattern/match-if-let.md)
- [解构Option](basic/match-pattern/option.md)
3 years ago
- [模式适用场景](basic/match-pattern/pattern-match.md)
3 years ago
- [全模式列表](basic/match-pattern/all-patterns.md)
3 years ago
- [方法Method](basic/method.md)
3 years ago
- [泛型和特征](basic/trait/intro.md)
- [泛型Generics](basic/trait/generic.md)
- [特征Trait](basic/trait/trait.md)
- [特征对象](basic/trait/trait-object.md)
- [进一步深入特征](basic/trait/advance-trait.md)
- [集合类型](basic/collections/intro.md)
- [动态数组Vector](basic/collections/vector.md)
- [KV存储HashMap](basic/collections/hashmap.md)
3 years ago
- [类型转换](basic/converse.md)
- [返回和错误处理](basic/result-error/intro.md)
3 years ago
- [panic深入剖析!](basic/result-error/panic.md)
- [返回值Result和?](basic/result-error/result.md)
3 years ago
3 years ago
- [Rust高级进阶 doing](advance/intro.md)
3 years ago
- [生命周期](advance/lifetime/intro.md)
- [认识生命周期](advance/lifetime/basic.md)
- [深入生命周期](advance/lifetime/advance.md)
3 years ago
- [高阶特征约束(HRTB) todo](advance/hrtb.md)
3 years ago
- [函数式编程](advance/functional-programing/intro.md)
3 years ago
- [闭包closure](advance/functional-programing/closure.md)
3 years ago
- [迭代器iterator](advance/functional-programing/iterator.md)
3 years ago
- [包和模块](advance/crate-module/intro.md)
- [包crate](advance/crate-module/crate.md)
- [模块Module](advance/crate-module/module.md)
3 years ago
- [使用use引入模块及受限可见性](advance/crate-module/use.md)
3 years ago
- [注释和文档](advance/comment.md)
3 years ago
- [深入类型之newtype和Sized](advance/custom-type.md)
- [格式化输出](advance/formatted-output.md)
- [智能指针 doing](advance/smart-pointer/intro.md)
- [Box<T>堆对象分配)](advance/smart-pointer/box.md)
3 years ago
- [Deref和Drop特征(todo)](advance/smart-pointer/deref-drop.md)
3 years ago
- [Cell todo](advance/smart-pointer/cell.md)
3 years ago
- [Rc与RefCell(todo)](advance/smart-pointer/rc-refcell.md)
- [自引用与内存泄漏(todo)](advance/smart-pointer/self-referrence.md)
3 years ago
- [全局变量 todo](advance/global-variable.md)
3 years ago
- [多线程 todo](advance/multi-threads/intro.md)
- [线程管理(todo)](advance/multi-threads/thread.md)
- [消息传递(todo)](advance/multi-threads/message-passing.md)
- [数据共享Arc、Mutex、Rwlock(todo)](advance/multi-threads/ref-counter-lock.md)
- [数据竞争(todo)](advance/multi-threads/races.md)
- [Send、Sync(todo)](advance/multi-threads/send-sync.md)
## 专题内容,每个专题都配套一个小型项目进行实践
3 years ago
- [Rust最佳实践 doing](practice/intro.md)
- [日常开发三方库精选](practice/third-party-libs.md)
- [一些写代码的技巧 todo](practice/coding-tips.md)
- [最佳实践 todo](practice/best-pratice.md)
3 years ago
- [Rust陷阱系列](pitfalls/index.md)
- [for循环中使用外部数组](pitfalls/use-vec-in-for.md)
- [线程类型导致的栈溢出](pitfalls/stack-overflow.md)
- [算术溢出导致的panic](pitfalls/arithmetic-overflow.md)
- [闭包中奇怪的生命周期](pitfalls/closure-with-lifetime.md)
- [可变变量不可变?](pitfalls/the-disabled-mutability.md)
- [可变借用失败引发的深入思考](pitfalls/multiple-mutable-references.md)
3 years ago
- [不太勤快的迭代器](pitfalls/lazy-iterators.md)
3 years ago
- [奇怪的序列x..y](pitfalls/weird-ranges.md)
3 years ago
- [错误处理 todo](errors/intro.md)
3 years ago
- [简化错误处理](errors/simplify.md)
- [自定义错误](errors/user-define.md)
- [让错误输出更优雅](errors/pretty-format.md)
3 years ago
- [会导致panic的代码](errors/panic-codes.md)
3 years ago
- [测试 todo](test/intro.md)
- [单元测试](test/unit.md)
- [集成测试](test/intergration.md)
- [性能测试](test/benchmark.md)
- [持续集成](test/ci.md)
3 years ago
- [常见特征解析 todo](traits/intro.md)
- [类型转换From/Into](traits/from-into.md)
- [AsRef, AsMut](traits/as-ref-as-mut.md)
- [Borrow, BorrowMut, ToOwned](traits/borrow-family.md)
- [Deref和引用隐式转换](traits/deref.md)
- [写时拷贝Cow](traits/cow.md)
3 years ago
- [Eq](traits/eq.md)
3 years ago
- [深入内存 todo](memory/intro.md)
- [指针和引用(todo)](memory/pointer-ref.md)
- [未初始化内存(todo)](memory/uninit.md)
- [内存分配(todo)](memory/allocation.md)
- [内存布局(todo)](memory/layout.md)
- [虚拟内存(todo)](memory/virtual.md)
3 years ago
- [网络和异步编程 todo](networking/intro.md)
- [TCP和网络原理(todo)](networking/tcp.md)
- [并发与并行(todo)](networking/concurrency-parallelism.md)
- [异步编程](networking/async/intro.md)
- [async/await语法](networking/async/async-await.md)
- [future详解](networking/async/future/into.md)
- [何为Future](networking/async/future/future.md)
- [任务调度](networking/async/future/task-schedule.md)
- [任务执行器](networking/async/future/task-excutor.md)
- [系统IO](networking/async/future/system-io.md)
- [执行多个Future](networking/async/future/multi-futures.md)
- [Pin、Unpin(todo)](networking/async/pin-unpin.md)
- [遇到不支持的异步特性?](networking/async/future/workarounds.md)
- [HTTP Client/Server](networking/async/http.md)
- [定海神针-tokio包](networking/async/tokio/intro.md)
- [基本用法](networking/async/tokio/basic.md)
- [异步消息流](networking/async/tokio/stream.md)
3 years ago
- [Web应用开发 todo](web/intro.md)
- [编解码与序列化 todo](web/serialization.md)
3 years ago
3 years ago
- [代码规范 doing](style-guide/intro.md)
3 years ago
- [命名规范](style-guide/naming.md)
- [代码风格(todo)](style-guide/code.md)
3 years ago
- [代码标记](style-guide/mark.md)
3 years ago
- [Clippy](style-guide/clippy.md)
- [面向对象 todo](object-oriented/intro.md)
- [为何OO(todo)](object-oriented/characteristics.md)
- [特征对象](object-oriented/trait-object.md)
- [设计模式](object-oriented/design-pattern.md)
3 years ago
- [不安全Rust todo](unsafe/intro.md)
- [原生指针(todo)](unsafe/raw-pointer.md)
- [修改全局变量](unsafe/modify-global-var.md)
- [FFI外部语言用](unsafe/ffi.md)
3 years ago
- [那些会导致UB的代码](unsafe/ub.md)
- [对抗编译检查 doing](fight-with-compiler/intro.md)
- [幽灵数据(todo)](fight-with-compiler/phantom-data.md)
- [生命周期)](fight-with-compiler/lifetime/intro.md)
- [生命周期过大-01](fight-with-compiler/lifetime/too-long1.md)
3 years ago
- [生命周期过大-02](fight-with-compiler/lifetime/too-long2.md)
- [循环中的生命周期](fight-with-compiler/lifetime/loop.md)
- [类型未限制(todo)](fight-with-compiler/unconstrained.md)
3 years ago
- [宏编程 todo](macro/intro.md)
- [过程宏(todo)](macro/procedure-macro.md)
3 years ago
- [性能调优 todo](performance/intro.md)
- [深入理解move](performance/deep-into-move.md)
- [糟糕的提前优化](performance/early-optimise.md)
3 years ago
- [Clone和Copy](performance/clone-copy.md)
- [Benchmark性能测试(todo)](performance/benchmark.md)
- [减少Runtime check(todo)](performance/runtime-check.md)
3 years ago
- [CPU缓存性能优化](performance/cpu-cache.md)
- [计算性能优化](performance/calculate.md)
- [堆和栈](performance/heap-stack.md)
- [常用性能测试工具](performance/tools.md)
3 years ago
3 years ago
- [编译器 todo](compiler/intro.md)
- [常见属性标记](compiler/attributes.md)
- [优化编译速度](compiler/speed-up.md)
3 years ago
- [日志和监控 todo](monitor/intro.md)
- [日志](monitor/log.md)
- [可观测性](monitor/observability.md)
- [监控(APM)](monitor/apm.md)
3 years ago
- [标准库解析 todo](std/intro.md)
3 years ago
- [如何寻找你想要的内容](std/search.md)
- [Vector常用方法](std/vector.md)
3 years ago
- [HashMap](std/hashmap.md)
3 years ago
- [Iterator常用方法](std/iterator.md)
3 years ago
3 years ago
- [常用三方库 todo](libraries/intro.md)
- [JSON](libraries/json/intro.md)
- [serde(todo)](libraries/json/serde.md)
- [HTTP](libraries/http/intro.md)
- [reqwest(todo)](libraries/http/reqwest.md)
- [命令行解析](libraries/command/intro.md)
- [structopt(todo)](libraries/command/structopt.md)
3 years ago
- [Cargo详解 todo](cargo/intro.md)
- [常用命令](cargo/commands.md)
- [项目结构](cargo/layout.md)
- [Cargo.toml和Cargo.lock](cargo/cargo-toml-lock.md)
- [依赖管理](cargo/dependency.md)
- [构建缓存](cargo/cache.md)
- [版本管理](cargo/version.md)
- [工作空间](cargo/workspace.md)
- [条件编译、条件依赖](cargo/feature.md)
- [配置参数(todo)](cargo/manifest.md)
- [自定义构建脚本](cargo/build-js.md)
- [Cargo profile](cargo/profile.md)
3 years ago
## 附录
- [附录](appendix/intro.md)
3 years ago
- [A-关键字](appendix/keywords.md)
- [B-运算符与符号](appendix/operators.md)
- [C-表达式](appendix/expressions.md)
- [D-派生特征derive](appendix/derive.md)
3 years ago
- [E-prelude模块 todo](appendix/prelude.md)
- [F-难点索引](appendix/difficulties.md)
- [G-Rust版本发布](appendix/rust-version.md)