-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathREADME.md
77 lines (57 loc) · 4.27 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Rust Source Code Analysis
[English](https://github.com/awesome-kusion/rust-code-book) [简体中文](https://github.com/awesome-kusion/rust-code-book-zh)
- *KusionStack(Go): <https://github.com/KusionStack/kusion>*
- *KCLVM(Rust): <https://github.com/KusionStack/KCLVM>*
## Preface
When I was working on KusionStack and KCLVM projects, I started to learn the source code of Rustc with the idea of learning the design of excellent compiler. I took some notes and documents during this process. With the suggestion of [Chai](https://github.com/chai2010), I organized them into an article and posted it. I didn't expect people to be interested in it, so I decided to continue writing articles on Rustc source code analysis. This is the original intention of writing this e-book.
KCLVM is a compiler we developed with Rust in the project of Kusion, and some parts of this book are applied to KCLVM. If you are interested in the cloud-native ecology and technology, you can learn about the project 👉 [KusionStack](https://github.com/KusionStack/kusion). And if you are interested in Rust, programming languages or compilers, maybe you prefer 👉 [KCLVM]( https://github.com/KusionStack/KCLVM).
Finally, most of the content in these e-book are my personal understanding when reading the source code, as well as some descriptions in the [rust-dev-guide](https://rustc-dev-guide.rust-lang.org/about-this-guide.html). Owing to the limitation of my knowledge, there must be mistakes and errors in the book. So we welcome all forms of conrtibutions(fix typo/polish english/translation/write article or other) from everyone.
---
## E-book
Target: Analysis and learn from the source code of Rust standard library, Rust compiler(Rustc) and open source project written by Rust.

- Github Repo: [https://github.com/awesome-kusion/rust-code-book](https://github.com/awesome-kusion/rust-code-book)
- Read Online: [https://awesome-kusion.github.io/rust-code-book](https://awesome-kusion.github.io/rust-code-book)
## Catalog
[Preface](preface.md)
- [Intro](intro/readme.md)
- [Standard Library](stdlib/readme.md)
- [Sort: Timsort and pdqsort[WIP: Zh-ver.]](stdlib/sort/readme.md) 🕒
- [Rust Compiler](rustc/readme.md)
- [Overview](rustc/overview/readme.md)
- [Invocation](rustc/invocation/readme.md)
- [Lexer](rustc/lexer/readme.md)
- [Parser](rustc/parser/readme.md)
<!-- - [AST](rustc/parser/ast/readme.md)
- [AST definition](rustc/parser/ast/ast.md)
- [Visitor](rustc/parser/ast/visitor.md)
- [EarlyLint](rustc/parser/early-lint/readme.md) -->
- [Sema](rustc/sema/readme.md)
- [Lint](rustc/sema/lint/readme.md) ✅
<!-- - [Lint and LintPass](rustc/sema/lint/lint-pass.md) ✅
- [CombinedLintPass](rustc/sema/lint/combinedlintpass.md) ✅
- [Execution Process[WIP]](rustc/sema/lint/lint.md) 🕒 -->
<!-- - [Resolver](rustc/sema/resovler/readme.md)
- [HIR lowering](rustc/sema/hir-lowering/readme.md)
- [Trait solving](rustc/sema/hir-lowering/trait-solving/readme.md)
- [Type Inference](rustc/sema/hir-lowering/type-inference/readme.md)
- [Type Checking](rustc/sema/hir-lowering/type-checking/readme.md)
- [LateLint](rustc/sema/late-lint/readme.md)
- [MIR lowering](rustc/sema/mir-lowering/readme.md)
- [Borrow checking](rustc/sema/mir-lowering/borrow-check/readme.md)
- [MIR Optimized](rustc/sema/mir-lowering/mir-optimized/readme.md) -->
- [Codegen](rustc/codegen/readme.md)
- [General](rustc/general/readme.md)
- [Errors[WIP: Zh-ver.]](rustc/general/errors/readme.md) 🕒
- [SourceMap & Span[WIP]](rustc/general/sourcemap-span/readme.md) 🕒
- [Rust Tools](rust-tools/readme.md)
<!-- - [Cargo](rust-tools/cargo/readme.md)
- [Clippy](rust-tools/clippy/readme.md) -->
- [Rust Open Source Project](open-source/readme.md)
- [KCLVM](open-source/KCLVM/readme.md) ✅
- [Appendix](appendix/readme.md)
---
[](https://star-history.com/#awesome-kusion/rust-code-book&Date)
Welcome to contact us in following ways:
- Slack: https://join.slack.com/t/rustcodebook/shared_invite/zt-1htuqzkf9-45i6FO1L~ihwnmbGGh7QEw
- Twitter: [He1pa](https://twitter.com/ZhengZh79945795)