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.

312 lines
16 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Rust 语言圣经
[Rust语言圣经](about-book.md)
[进入 Rust 编程世界](into-rust.md)
[AWS 为何这么喜欢 Rust?](usecases/aws-rust.md)
[快速查询入口](index-list.md)
# 快速开始
---
- [寻找牛刀,以便小试](first-try/intro.md)
- [安装 Rust 环境](first-try/installation.md)
- [墙推 VSCode!](first-try/editor.md)
- [认识 Cargo](first-try/cargo.md)
- [不仅仅是 Hello world](first-try/hello-world.md)
- [避免从入门到放弃](first-try/sth-you-should-not-do.md)
# Rust语言特性
---
- [Rust 基础入门](basic/intro.md)
- [变量绑定与解构](basic/variable.md)
- [基本类型](basic/base-type/index.md)
- [数值类型](basic/base-type/numbers.md)
- [字符、布尔、单元类型](basic/base-type/char-bool.md)
- [语句与表达式](basic/base-type/statement-expression.md)
- [函数](basic/base-type/function.md)
- [所有权和借用](basic/ownership/index.md)
- [所有权](basic/ownership/ownership.md)
- [引用与借用](basic/ownership/borrowing.md)
- [复合类型](basic/compound-type/intro.md)
- [字符串与切片](basic/compound-type/string-slice.md)
- [元组](basic/compound-type/tuple.md)
- [结构体](basic/compound-type/struct.md)
- [枚举](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)
- [模式适用场景](basic/match-pattern/pattern-match.md)
- [全模式列表](basic/match-pattern/all-patterns.md)
- [方法 Method](basic/method.md)
- [泛型和特征](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)
- [类型转换](basic/converse.md)
- [返回值和错误处理](basic/result-error/intro.md)
- [panic 深入剖析!](basic/result-error/panic.md)
- [返回值 Result 和?](basic/result-error/result.md)
- [包和模块](basic/crate-module/intro.md)
- [包 Crate](basic/crate-module/crate.md)
- [模块 Module](basic/crate-module/module.md)
- [使用 use 引入模块及受限可见性](basic/crate-module/use.md)
- [注释和文档](basic/comment.md)
- [格式化输出](basic/formatted-output.md)
- [Rust 高级进阶](advance/intro.md)
- [生命周期](advance/lifetime/intro.md)
- [认识生命周期](advance/lifetime/basic.md)
- [深入生命周期](advance/lifetime/advance.md)
- [&'static 和 T: 'static](advance/lifetime/static.md)
<!-- - [一些关于生命周期的误解 todo](advance/lifetime/misconceptions.md) -->
- [函数式编程: 闭包、迭代器](advance/functional-programing/intro.md)
- [闭包 Closure](advance/functional-programing/closure.md)
- [迭代器 Iterator](advance/functional-programing/iterator.md)
- [深入类型](advance/into-types/intro.md)
- [newtype 和 类型别名](advance/into-types/custom-type.md)
- [Sized 和不定长类型 DST](advance/into-types/sized.md)
- [枚举和整数](advance/into-types/enum-int.md)
- [智能指针](advance/smart-pointer/intro.md)
- [Box<T>堆对象分配](advance/smart-pointer/box.md)
- [Deref 解引用](advance/smart-pointer/deref.md)
- [Drop 释放资源](advance/smart-pointer/drop.md)
- [Rc 与 Arc 实现 1vN 所有权机制](advance/smart-pointer/rc-arc.md)
- [Cell 与 RefCell 内部可变性](advance/smart-pointer/cell-refcell.md)
- [循环引用与自引用](advance/circle-self-ref/intro.md)
- [Weak 与循环引用](advance/circle-self-ref/circle-reference.md)
- [结构体中的自引用](advance/circle-self-ref/self-referential.md))
- [多线程并发编程](advance/concurrency-with-threads/intro.md)
- [并发和并行](advance/concurrency-with-threads/concurrency-parallelism.md)
- [使用多线程](advance/concurrency-with-threads/thread.md)
- [线程同步:消息传递](advance/concurrency-with-threads/message-passing.md)
- [线程同步锁、Condvar 和信号量](advance/concurrency-with-threads/sync1.md)
- [线程同步Atomic 原子操作与内存顺序](advance/concurrency-with-threads/sync2.md)
- [基于 Send 和 Sync 的线程安全](advance/concurrency-with-threads/send-sync.md)
- [实践应用:多线程 Web 服务器 todo](advance/concurrency-with-threads/web-server.md)
- [全局变量](advance/global-variable.md)
- [错误处理](advance/errors.md)
- [Unsafe Rust](advance/unsafe/intro.md)
- [五种兵器](advance/unsafe/superpowers.md)
- [内联汇编 todo](advance/unsafe/inline-asm.md)
- [Macro 宏编程](advance/macro.md)
<!-- - [SIMD todo](advance/simd.md) -->
<!-- - [高阶特征约束(HRTB) todo](advance/hrtb.md) -->
- [易混淆概念解析](advance/confonding/intro.md)
- [切片和切片引用](advance/confonding/slice.md)
- [Eq 和 PartialEq](advance/confonding/eq.md)
- [String、&str 和 str todo](advance/confonding/string.md)
- [裸指针、引用和智能指针 todo](advance/confonding/pointer.md)
- [作用域、生命周期和 NLL todo](advance/confonding/lifetime.md)
- [move、Copy 和 Clone todo](advance/confonding/move-copy.md)
- [Rust 异步编程](async-rust/intro.md)
- [async/await 异步编程](async-rust/async/intro.md)
- [async 编程入门](async-rust/async/getting-started.md)
- [底层探秘: Future 执行与任务调度](async-rust/async/future-excuting.md)
- [定海神针 Pin 和 Unpin](async-rust/async/pin-unpin.md)
- [async/await 和 Stream 流处理](async-rust/async/async-await.md)
- [同时运行多个 Future](async-rust/async/multi-futures-simultaneous.md)
- [一些疑难问题的解决办法](async-rust/async/pain-points-and-workarounds.md)
- [实践应用Async Web 服务器](async-rust/async/web-server.md)
- [Tokio 使用指南](async-rust/tokio/intro.md)
- [tokio 概览](async-rust/tokio/overview.md)
- [使用初印象](async-rust/tokio/getting-startted.md)
- [创建异步任务](async-rust/tokio/spawning.md)
- [共享状态](async-rust/tokio/shared-state.md)
- [消息传递](async-rust/tokio/channels.md)
- [I/O](async-rust/tokio/io.md)
- [解析数据帧](async-rust/tokio/frame.md)
- [深入 async](async-rust/tokio/async.md)
- [select](async-rust/tokio/select.md)
- [类似迭代器的 Stream](async-rust/tokio/stream.md))
- [优雅的关闭](async-rust/tokio/graceful-shutdown.md)
- [异步跟同步共存](async-rust/tokio/bridging-with-sync.md)
# 常用工具链
---
- [自动化测试](test/intro.md)
- [编写测试及控制执行](test/write-tests.md)
- [单元测试和集成测试](test/unit-integration-test.md)
- [断言 assertion](test/assertion.md)
- [用 Github Actions 进行持续集成](test/ci.md)
- [基准测试 benchmark](test/benchmark.md)
- [Cargo 使用指南](cargo/intro.md)
- [上手使用](cargo/getting-started.md)
- [基础指南](cargo/guide/intro.md)
- [为何会有 Cargo](cargo/guide/why-exist.md)
- [下载并构建 Package](cargo/guide/download-package.md)
- [添加依赖](cargo/guide/dependencies.md)
- [Package 目录结构](cargo/guide/package-layout.md)
- [Cargo.toml vs Cargo.lock](cargo/guide/cargo-toml-lock.md)
- [测试和 CI](cargo/guide/tests-ci.md)
- [Cargo 缓存](cargo/guide/cargo-cache.md)
- [Build 缓存](cargo/guide/build-cache.md)
- [进阶指南](cargo/reference/intro.md)
- [指定依赖项](cargo/reference/specify-deps.md)
- [依赖覆盖](cargo/reference/deps-overriding.md)
- [Cargo.toml 清单详解](cargo/reference/manifest.md)
- [Cargo Target](cargo/reference/cargo-target.md)
- [工作空间 Workspace](cargo/reference/workspaces.md)
- [条件编译 Features](cargo/reference/features/intro.md)
- [Features 示例](cargo/reference/features/examples.md)
- [发布配置 Profile](cargo/reference/profiles.md)
- [通过 config.toml 对 Cargo 进行配置](cargo/reference/configuration.md)
- [发布到 crates.io](cargo/reference/publishing-on-crates.io.md)
- [构建脚本 build.rs](cargo/reference/build-script/intro.md)
- [构建脚本示例](cargo/reference/build-script/examples.md)
# 高级专题
---
- [Rust 最佳实践](practice/intro.md)
- [对抗编译检查](practice/fight-with-compiler/intro.md)
- [生命周期](practice/fight-with-compiler/lifetime/intro.md)
- [生命周期过大-01](practice/fight-with-compiler/lifetime/too-long1.md)
- [生命周期过大-02](practice/fight-with-compiler/lifetime/too-long2.md)
- [循环中的生命周期](practice/fight-with-compiler/lifetime/loop.md)
- [闭包碰到特征对象-01](practice/fight-with-compiler/lifetime/closure-with-static.md)
- [重复借用](practice/fight-with-compiler/borrowing/intro.md)
- [同时在函数内外使用引用](practice/fight-with-compiler/borrowing/ref-exist-in-out-fn.md)
- [智能指针引起的重复借用错误](practice/fight-with-compiler/borrowing/borrow-distinct-fields-of-struct.md)
- [类型未限制(todo)](practice/fight-with-compiler/unconstrained.md)
- [幽灵数据(todo)](practice/fight-with-compiler/phantom-data.md)
- [Rust 常见陷阱](practice/pitfalls/index.md)
- [for 循环中使用外部数组](practice/pitfalls/use-vec-in-for.md)
- [线程类型导致的栈溢出](practice/pitfalls/stack-overflow.md)
- [算术溢出导致的 panic](practice/pitfalls/arithmetic-overflow.md)
- [闭包中奇怪的生命周期](practice/pitfalls/closure-with-lifetime.md)
- [可变变量不可变?](practice/pitfalls/the-disabled-mutability.md)
- [可变借用失败引发的深入思考](practice/pitfalls/multiple-mutable-references.md)
- [不太勤快的迭代器](practice/pitfalls/lazy-iterators.md)
- [奇怪的序列 x..y](practice/pitfalls/weird-ranges.md)
- [无处不在的迭代器](practice/pitfalls/iterator-everywhere.md)
- [线程间传递消息导致主线程无法结束](practice/pitfalls/main-with-channel-blocked.md)
- [警惕 UTF-8 引发的性能隐患](practice/pitfalls/utf8-performance.md)
- [日常开发三方库精选](practice/third-party-libs.md)
- [命名规范](practice/naming.md)
- [面试经验 doing](practice/interview.md)
- [代码开发实践 todo](practice/best-pratice.md)
- [日志记录 todo](practice/logs.md)
- [可观测性监控 todo](practice/observability.md)
- [手把手带你实现链表](too-many-lists/intro.md)
- [我们到底需不需要链表](too-many-lists/do-we-need-it.md)
- [不太优秀的单向链表:栈](too-many-lists/bad-stack/intro.md)
- [数据布局](too-many-lists/bad-stack/layout.md)
- [基本操作](too-many-lists/bad-stack/basic-operations.md)
- [最后实现](too-many-lists/bad-stack/final-code.md)
- [还可以的单向链表](too-many-lists/ok-stack/intro.md)
- [优化类型定义](too-many-lists/ok-stack/type-optimizing.md)
- [定义 Peek 函数](too-many-lists/ok-stack/peek.md)
- [IntoIter 和 Iter](too-many-lists/ok-stack/iter.md)
- [IterMut以及完整代码](too-many-lists/ok-stack/itermut.md)
- [持久化单向链表](too-many-lists/persistent-stack/intro.md)
- [数据布局和基本操作](too-many-lists/persistent-stack/layout.md)
- [Drop、Arc 及完整代码](too-many-lists/persistent-stack/drop-arc.md)
- [不咋样的双端队列](too-many-lists/deque/intro.md)
- [数据布局和基本操作](too-many-lists/deque/layout.md)
- [Peek](too-many-lists/deque/peek.md)
- [基本操作的对称镜像](too-many-lists/deque/symmetric.md)
- [迭代器](too-many-lists/deque/iterator.md)
- [最终代码](too-many-lists/deque/final-code.md)
- [不错的unsafe队列](too-many-lists/unsafe-queue/intro.md)
- [数据布局](too-many-lists/unsafe-queue/layout.md)
- [基本操作](too-many-lists/unsafe-queue/basics.md)
- [Miri](too-many-lists/unsafe-queue/miri.md)
- [栈借用](too-many-lists/unsafe-queue/stacked-borrow.md)
- [测试栈借用](too-many-lists/unsafe-queue/testing-stacked-borrow.md)
- [数据布局2](too-many-lists/unsafe-queue/layout2.md)
- [额外的操作](too-many-lists/unsafe-queue/extra-junk.md)
- [最终代码](too-many-lists/unsafe-queue/final-code.md)
- [使用高级技巧实现链表](too-many-lists/advanced-lists/intro.md)
- [生产级可用的双向链表](too-many-lists/advanced-lists/unsafe-deque.md)
- [双单向链表](too-many-lists/advanced-lists/double-singly.md)
- [栈上的链表](too-many-lists/advanced-lists/stack-allocated.md)
- [Rust 性能优化 todo](profiling/intro.md)
- [深入内存 todo](profiling/memory/intro.md)
- [指针和引用 todo](profiling/memory/pointer-ref.md)
- [未初始化内存 todo](profiling/memory/uninit.md)
- [内存分配 todo](profiling/memory/allocation.md)
- [内存布局 todo](profiling/memory/layout.md)
- [虚拟内存 todo](profiling/memory/virtual.md)
- [性能调优 doing](profiling/performance/intro.md)
- [字符串操作性能](profiling/performance/string.md)
- [深入理解 move](profiling/performance/deep-into-move.md)
- [糟糕的提前优化 todo](profiling/performance/early-optimise.md)
- [Clone 和 Copy todo](profiling/performance/clone-copy.md)
- [减少 Runtime check(todo)](profiling/performance/runtime-check.md)
- [CPU 缓存性能优化 todo](profiling/performance/cpu-cache.md)
- [计算性能优化 todo](profiling/performance/calculate.md)
- [堆和栈 todo](profiling/performance/heap-stack.md)
- [内存 allocator todo](profiling/performance/allocator.md)
- [常用性能测试工具 todo](profiling/performance/tools.md)
- [Enum 内存优化 todo](profiling/performance/enum.md)
- [编译优化 todo](profiling/compiler/intro.md)
- [LLVM todo](profiling/compiler/llvm.md)
- [常见属性标记 todo](profiling/compiler/attributes.md)
- [提升编译速度 todo](profiling/compiler/speed-up.md)
- [编译器优化 todo](profiling/compiler/optimization/intro.md)
- [Option 枚举 todo](profiling/compiler/optimization/option.md)
- [标准库解析 todo](std/intro.md)
- [标准库使用最佳时间 todo](std/search.md)
- [Vector 常用方法 todo](std/vector.md)
- [HashMap todo](std/hashmap.md)
- [Iterator 常用方法 todo](std/iterator.md)
- [CookBook doing](cookbook/intro.md)
- [常用算法]()
- [生成随机值](cookbook/algos/randomness.md)
- [Vec 排序](cookbook/algos/sorting.md)
- [命令行解析 todo](cookbook/cmd.md)
- [配置文件解析 todo](cookbook/config.md)
- [编解码 todo](cookbook/encoding/intro.md)
- [JSON](cookbook/encoding/json.md)
- [CSV](cookbook/encoding/csv.md)
- [protobuf](cookbook/encoding/protobuf.md)
- [文件系统 todo](cookbook/file/intro.md)
- [文件读写](cookbook/file/file.md)
- [目录操作](cookbook/file/dir.md)
- [网络通信 todo](cookbook/protocol/intro.md)
- [HTTP](cookbook/protocol/http.md)
- [TCP](cookbook/protocol/tcp.md)
- [UDP](cookbook/protocol/udp.md)
- [gRPC](cookbook/protocol/grpc.md)
- [数据库访问 todo](cookbook/database.md)
- [正则表达式 todo](cookbook/regexp.md)
- [加密解密 todo](cookbook/crypto.md)
- [时间日期](cookbook/date.md)
- [开发调试 todo](cookbook/dev/intro.md)
- [日志](cookbook/dev/logs.md)
- [性能分析](cookbook/dev/profile.md)
<!--
- [Rust区块链入门]()
- [Rust游戏开发入门]()
- [Rust前端开发入门]()
- [Rust和WASM]() -->
# 附录
---
- [Appendix]()
- [A-关键字](appendix/keywords.md)
- [B-运算符与符号](appendix/operators.md)
- [C-表达式](appendix/expressions.md)
- [D-派生特征 trait](appendix/derive.md)
- [E-prelude 模块 todo](appendix/prelude.md)
- [F-Rust 版本说明](appendix/rust-version.md)
- [G-Rust 更新版本列表](appendix/rust-versions/intro.md)
- [1.58](appendix/rust-versions/1.58.md)
- [1.59](appendix/rust-versions/1.59.md)