{"id":14991972,"url":"https://github.com/better-rs/annotated-rs","last_synced_at":"2025-09-25T14:30:46.250Z","repository":{"id":38397348,"uuid":"458486276","full_name":"better-rs/annotated-rs","owner":"better-rs","description":"rust 项目源码分析","archived":false,"fork":false,"pushed_at":"2022-08-19T08:00:27.000Z","size":7916,"stargazers_count":57,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-25T16:08:59.047Z","etag":null,"topics":["annotated","annotation","annotations","axum","code-analysis","rust","substrate","tokio"],"latest_commit_sha":null,"homepage":"","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/better-rs.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-02-12T10:16:39.000Z","updated_at":"2024-09-24T15:04:32.000Z","dependencies_parsed_at":"2022-08-18T14:11:49.912Z","dependency_job_id":null,"html_url":"https://github.com/better-rs/annotated-rs","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/better-rs%2Fannotated-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/better-rs%2Fannotated-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/better-rs%2Fannotated-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/better-rs%2Fannotated-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/better-rs","download_url":"https://codeload.github.com/better-rs/annotated-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234200156,"owners_count":18795139,"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":["annotated","annotation","annotations","axum","code-analysis","rust","substrate","tokio"],"created_at":"2024-09-24T15:00:37.501Z","updated_at":"2025-09-25T14:30:41.702Z","avatar_url":"https://github.com/better-rs.png","language":"Rust","readme":"# annotated-rs:\n\n\n\n\u003cp align=\"\"\u003e\n    \u003ca href=\"https://discord.com/invite/MnDA9pfWAW\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/Discord-GossipCoder-%237289DA.svg?logo=iscord\u0026logoColor=white\" alt=\"Discord\"\u003e\n    \u003c/a\u003e \n    \u003ca href=\"https://discord.com/invite/MnDA9pfWAW\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://img.shields.io/discord/877031318272217179\" alt=\"Discord\"\u003e\n    \u003c/a\u003e \n    \u003cimg src=\"https://visitor-badge.laobi.icu/badge?page_id=better-rs\" alt=\"10000\" /\u003e\n\u003c/p\u003e\n\n\n\n- rust 知名项目源码分析\n\n## related:\n\n- https://github.com/better-rs/learn-rs\n    - rust 编程练习, 包含一些算法练习\n\n## 注解项目列表:\n\n\u003e 进展: axum / substrate 注解ing\n\n- 入口在每个项目([packages](./packages))的 `README.md` 中, 如 [axum](./packages/axum/readme.md)\n\n| 项目                                | 类型     | 评分     | 注解状态 | 备注                                                                               |\n|:----------------------------------|:-------|:-------|:-----|:---------------------------------------------------------------------------------|\n| [tokio](./packages/tokio)         | 异步 I/O | ⭐⭐⭐⭐⭐⭐ | Yes  | [v1.14.1](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.14.1)           |\n| [axum](./packages/axum)           | web 框架 | ⭐⭐⭐⭐⭐⭐ | Yes  | [v0.4.5](https://github.com/tokio-rs/axum/releases/tag/axum-v0.4.5)              |\n| [rocket](./packages/rocket)       | web 框架 | ⭐⭐⭐⭐   | Yes    | [v0.5.0-rc.2](https://github.com/SergioBenitez/Rocket/releases/tag/v0.5.0-rc.2)      |\n| [substrate](./packages/substrate) | 区块链    | ⭐⭐⭐⭐⭐⭐ | Yes  | [v2022-02](https://github.com/paritytech/substrate/releases/tag/monthly-2022-02) |\n| [xxx](./xxx)                      | Web 框架 | ⭐⭐⭐    | No   | https://github.com/actix/actix-web                                               |\n| [xxx](./xxx)                      | kv db  | ⭐⭐⭐    | No   | https://github.com/tikv/tikv                                                     |\n| [xxx](./xxx)                      | db ORM | ⭐⭐⭐    | No   | https://github.com/diesel-rs/diesel                                              |\n| [xxx](./xxx)                      | 区块链    | ⭐⭐⭐    | No   | https://github.com/solana-labs/solana                                            |\n| [xxx](./xxx)                      | xxx    | ⭐⭐⭐    | No   | xxx                                                                              |\n| [xxx](./xxx)                      | xxx    | ⭐⭐⭐    | No   | xxx                                                                              |\n| [xxx](./xxx)                      | xxx    | ⭐⭐⭐    | No   | xxx                                                                              |\n\n## 准备工作:\n\n- 拉取本 repo:\n\n```ruby\n\ngit clone git@github.com:better-rs/annotated-rs.git\n\n# or:\ngit clone https://github.com/better-rs/annotated-rs.git\n\n```\n\n### 1. 搭建阅读环境:\n\n\u003e 安装 rust 开发环境\n\n- 略\n\n\u003e 配置源码阅读工具: Clion\n\n- https://github.com/better-rs/.github/discussions/8\n- 更好的代码跳转\n- 默认单个目标项目内, 是无法自动识别+跳转的\n- Clion Mem:  建议 \u003e 4GB, `Substrate` 工程源码巨大, IDE 默认内存不足\n\n\u003e 以 axum 为例:\n\n- IDE 打开: `axum-axum-v0.4.5` 文件夹, 找到 `Cargo.toml` 右键,\n- 需要手动找到工程的根目录, attach `Cargo.toml` 配置\n- 之后 IDE 会自动安装依赖包\n- 首次索引会比较慢, 耐心等待\n\n### 阅读 axum:\n\n\u003e 安装依赖包:\n\n- 依赖 go-task 工具(替代 Makefile)\n\n```ruby \n\n\ntask install \n\n```\n\n## 默认注解规则:\n\n\u003e `TODO X: XXX` 标志:\n\n- 所有新增注解, 注释前缀为如下2种格式:\n- 区分原 repo 注释, 以及方便醒目查看\n\n```ruby \n\n// TODO X: xxx\n// todo x: xxx\n\n```\n\n\u003e `jump in` 标志:\n\n- 此处基于 IDE, 可以跳转上下文, 会继续注解\n\n## ref:\n\n- https://fancy.rs/\n- https://github.com/tokio-rs\n- https://github.com/AppFlowy-IO/AppFlowy\n- https://github.com/rustdesk/rustdesk\n- https://github.com/getzola/zola\n- https://github.com/LemmyNet/lemmy\n    - reddit 社区\n","funding_links":[],"categories":["Summary"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetter-rs%2Fannotated-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetter-rs%2Fannotated-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetter-rs%2Fannotated-rs/lists"}