{"id":13634817,"url":"https://awesome-kusion.github.io/rust-code-book/","last_synced_at":"2025-04-18T23:33:04.894Z","repository":{"id":57791582,"uuid":"524899268","full_name":"awesome-kusion/rust-code-book","owner":"awesome-kusion","description":":books: Open Source book: Rust Source Code Analysis","archived":false,"fork":false,"pushed_at":"2022-10-14T05:17:08.000Z","size":6223,"stargazers_count":206,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T10:11:48.236Z","etag":null,"topics":["awesome","book","rust","rust-code-book","rust-lang"],"latest_commit_sha":null,"homepage":"https://awesome-kusion.github.io/rust-code-book/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awesome-kusion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-15T07:50:02.000Z","updated_at":"2024-12-20T04:05:20.000Z","dependencies_parsed_at":"2023-01-20T01:17:59.861Z","dependency_job_id":null,"html_url":"https://github.com/awesome-kusion/rust-code-book","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awesome-kusion%2Frust-code-book","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awesome-kusion%2Frust-code-book/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awesome-kusion%2Frust-code-book/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awesome-kusion%2Frust-code-book/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awesome-kusion","download_url":"https://codeload.github.com/awesome-kusion/rust-code-book/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565250,"owners_count":21292427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesome","book","rust","rust-code-book","rust-lang"],"created_at":"2024-08-02T00:00:35.119Z","updated_at":"2025-04-18T23:33:04.431Z","avatar_url":"https://github.com/awesome-kusion.png","language":"Rust","funding_links":[],"categories":["电子书"],"sub_categories":[],"readme":"# Rust Source Code Analysis\n\n[English](https://github.com/awesome-kusion/rust-code-book) [简体中文](https://github.com/awesome-kusion/rust-code-book-zh)\n\n- *KusionStack(Go): \u003chttps://github.com/KusionStack/kusion\u003e*\n- *KCLVM(Rust): \u003chttps://github.com/KusionStack/KCLVM\u003e*\n\n## Preface\n\nWhen 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.\n\nKCLVM 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 \u0026#x1F449; [KusionStack](https://github.com/KusionStack/kusion). And if you are interested in Rust, programming languages or compilers, maybe you prefer \u0026#x1F449; [KCLVM]( https://github.com/KusionStack/KCLVM).\n\nFinally, 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.\n\n---\n\n## E-book\n\nTarget: Analysis and learn from the source code of Rust standard library, Rust compiler(Rustc) and open source project written by Rust.\n\n![cover](cover-full.png)\n\n- Github Repo: [https://github.com/awesome-kusion/rust-code-book](https://github.com/awesome-kusion/rust-code-book)\n- Read Online: [https://awesome-kusion.github.io/rust-code-book](https://awesome-kusion.github.io/rust-code-book)\n\n## Catalog\n\n[Preface](preface.md)\n\n- [Intro](intro/readme.md)\n- [Standard Library](stdlib/readme.md)\n  - [Sort: Timsort and pdqsort[WIP: Zh-ver.]](stdlib/sort/readme.md) \u0026#x1F552;\n- [Rust Compiler](rustc/readme.md)\n  - [Overview](rustc/overview/readme.md)\n  - [Invocation](rustc/invocation/readme.md)\n  - [Lexer](rustc/lexer/readme.md)\n  - [Parser](rustc/parser/readme.md)\n    \u003c!-- - [AST](rustc/parser/ast/readme.md)\n      - [AST definition](rustc/parser/ast/ast.md)\n      - [Visitor](rustc/parser/ast/visitor.md)\n    - [EarlyLint](rustc/parser/early-lint/readme.md) --\u003e\n  - [Sema](rustc/sema/readme.md)\n    - [Lint](rustc/sema/lint/readme.md) \u0026#x2705;\n      \u003c!-- - [Lint and LintPass](rustc/sema/lint/lint-pass.md) \u0026#x2705;\n      - [CombinedLintPass](rustc/sema/lint/combinedlintpass.md) \u0026#x2705;\n      - [Execution Process[WIP]](rustc/sema/lint/lint.md)  \u0026#x1F552; --\u003e\n    \u003c!-- - [Resolver](rustc/sema/resovler/readme.md)\n    - [HIR lowering](rustc/sema/hir-lowering/readme.md)\n      - [Trait solving](rustc/sema/hir-lowering/trait-solving/readme.md)\n      - [Type Inference](rustc/sema/hir-lowering/type-inference/readme.md)\n      - [Type Checking](rustc/sema/hir-lowering/type-checking/readme.md)\n      - [LateLint](rustc/sema/late-lint/readme.md)\n    - [MIR lowering](rustc/sema/mir-lowering/readme.md)\n      - [Borrow checking](rustc/sema/mir-lowering/borrow-check/readme.md)\n      - [MIR Optimized](rustc/sema/mir-lowering/mir-optimized/readme.md) --\u003e\n  - [Codegen](rustc/codegen/readme.md)\n  - [General](rustc/general/readme.md)\n    - [Errors[WIP: Zh-ver.]](rustc/general/errors/readme.md)  \u0026#x1F552;\n    - [SourceMap \u0026 Span[WIP]](rustc/general/sourcemap-span/readme.md)  \u0026#x1F552;\n\n- [Rust Tools](rust-tools/readme.md)\n  \u003c!-- - [Cargo](rust-tools/cargo/readme.md)\n  - [Clippy](rust-tools/clippy/readme.md) --\u003e\n\n- [Rust Open Source Project](open-source/readme.md)\n  - [KCLVM](open-source/KCLVM/readme.md) \u0026#x2705;\n- [Appendix](appendix/readme.md)\n\n---\n\n[![Star History Chart](https://api.star-history.com/svg?repos=awesome-kusion/rust-code-book\u0026type=Date)](https://star-history.com/#awesome-kusion/rust-code-book\u0026Date)\n\n\nWelcome to contact us in following ways:\n- Slack: https://join.slack.com/t/rustcodebook/shared_invite/zt-1htuqzkf9-45i6FO1L~ihwnmbGGh7QEw\n- Twitter: [He1pa](https://twitter.com/ZhengZh79945795)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/awesome-kusion.github.io%2Frust-code-book%2F","html_url":"https://awesome.ecosyste.ms/projects/awesome-kusion.github.io%2Frust-code-book%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/awesome-kusion.github.io%2Frust-code-book%2F/lists"}