{"id":13577232,"url":"https://github.com/Warrenren/inside-rust-std-library","last_synced_at":"2025-04-05T11:31:48.000Z","repository":{"id":37710113,"uuid":"449725294","full_name":"Warrenren/inside-rust-std-library","owner":"Warrenren","description":"本书已经正式出版，目前正预售，可在京东搜索《深入RUST标准库》即可。本书主要对RUST的标准库代码进行分析，并试图给出RUST标准库代码的分析脉络。This project try to give a venation of how reading the RUST standard library source code. ","archived":false,"fork":false,"pushed_at":"2024-04-24T00:57:55.000Z","size":791,"stargazers_count":1431,"open_issues_count":9,"forks_count":205,"subscribers_count":32,"default_branch":"main","last_synced_at":"2024-10-15T09:41:07.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Warrenren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-01-19T14:30:15.000Z","updated_at":"2024-10-07T01:40:27.000Z","dependencies_parsed_at":"2024-04-22T06:52:49.059Z","dependency_job_id":null,"html_url":"https://github.com/Warrenren/inside-rust-std-library","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/Warrenren%2Finside-rust-std-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Warrenren%2Finside-rust-std-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Warrenren%2Finside-rust-std-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Warrenren%2Finside-rust-std-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Warrenren","download_url":"https://codeload.github.com/Warrenren/inside-rust-std-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223186486,"owners_count":17102471,"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":[],"created_at":"2024-08-01T15:01:19.560Z","updated_at":"2025-04-05T11:31:47.992Z","avatar_url":"https://github.com/Warrenren.png","language":null,"funding_links":[],"categories":["Others","Summary"],"sub_categories":[],"readme":"# inside-rust-std-library\n实体书已经出版，名字为《深入rust标准库》，正在预售，可在京东搜索到。欢迎大家采购实体书籍，给作者一些支持。   \n本书主要对RUST的标准库代码进行分析。  \n本书尽可能给读者找出一条标准库代码的阅读脉络。同时，分析不仅仅针对代码的功能，也针对代码背后的需求及若干代码设计的思路。   \nC语言精通的标志是对指针的精通。RUST的裸指针也是RUST的最基础及最核心的难点之一。 \n所以，将裸指针及相关的内存模块作为代码分析的起始点，熟悉了裸指针及内存，自然也就对所有权，借用，生命周期的本质有了深刻的理解，RUST语言的最难关便过了。      \n泛型是RUST不可分割的语法之一，而对于其他语言，没有泛型不影响语言的使用。泛型及基于trait的泛型约束是RUST的另一个代码基础。    \n针对基本类型的分析，可以看到RUST利用trait语法使之具备了无限的扩展性，这是RUST更有表现力的语法能力的展现。     \nOption\u003cT\u003e/Result\u003cT,E\u003e等类型实际完全是由标准库定义的，并不是RUST语言最底层的基本内容，可以从代码分析中发现这一点。    \n所有的运算符都可以重载，且可以跨越类型重载，RUST的运算符重载揭示了RUST很多的编码奥秘及技巧。       \nIterator加闭包是函数式编程的基础构架，Iterator的适配器构成了函数式编程的基础设施，RUST完整的实现了这些内容，并且几乎为每个类型都实现了迭代器，并尽可能的为函数式编程做好了准备。    \nCell\u003cT\u003e/RefCell\u003cT\u003e/Pin\u003cT\u003e/Lazy\u003cT\u003e代码证明了在RUST的基础语法下，如何创造性的解决问题。     \nBox\u003cT\u003e/RawVec\u003cT\u003e是两个堆内存申请的基本结构，善用这两个结构，除非写内存管理，基本上就不必再接触底层的堆内存申请及释放。    \n每一个智能指针实际上也是RUST对经典的数据结构实现的精妙例程。    \nRUST对不同操作系统的适配让程序员不必象C那样再重复的耗费精力并且还沾沾自喜于此份工作。    \n仅支持异步编程的async/await，Future也体现了RUST的作最基础的工作的态度。  \n...  \n...  \n\n如果您觉得内容对您有帮助，请扫码下面的微信付款码对作者给以赞助或购买实体书 :)。\n![image](https://github.com/user-attachments/assets/19f04302-c5ed-4a77-8d97-b9039008c318)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWarrenren%2Finside-rust-std-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWarrenren%2Finside-rust-std-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWarrenren%2Finside-rust-std-library/lists"}