MCPcopy Index your code
hub / github.com/QMHTMY/RustBook

github.com/QMHTMY/RustBook @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,718 symbols 3,550 edges 344 files 371 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

簡介 [En]

一本 Rust 書籍,有簡體、繁體和英文版。內容包括算法分析,基本數據結構和算法,外加一些實戰。共有拾章,其目錄如下。

  • 第壹章:Rust 基礎
    • Rust 回顧
    • Rust 學習資源
  • 第貳章:計算機科學
    • 計算機科學概念
  • 第叁章:算法分析
    • 性能分析:大 O 分析法
  • 第肆章:基本數據結構
    • 棧、隊列、雙端隊列、鏈表、Vec
  • 第伍章:遞歸
    • 遞歸三定律、尾遞歸、動態規劃
  • 第陸章:查找
    • 順序查找、二分查找、哈希查找
  • 第柒章:排序
    • 十大排序算法
  • 第捌章:樹
    • 二叉樹、二叉堆、二叉查找樹、平衡二叉樹
  • 第玖章:圖
    • 圖的表示、廣度優先、深度優先、最短路徑
  • 第拾章:實戰
    • 編輯距離、字典樹、過濾器、緩存淘汰
    • 一致性哈希、Base58編碼、區塊鏈

代碼

所有代碼按照章節保存在 publication/code/

code_statistics

更新日誌

  • 2023-06-18 添加出版說明
  • 2023-04-29 添加英文版
  • 2022-05-15 添加新目錄 publication
  • 2022-02-27 更換書籍封面
  • 2022-02-15 添加收藏數變化圖
  • 2022-02-12 添加代碼統計信息
  • 2022-02-09 修復單詞拼寫錯誤、解決 usize 減法溢出 panic
  • 2022-02-06 更改代碼字體為等寬字體:Source Code Pro
  • 2022-02-02 更新到 Rust 1.58 版
  • 2022-01-31 上傳代碼及最終文稿【簡/繁】
  • 2021-04-24 上傳初始文稿

出版信息

目前,本書已出版,出版物比開源版本多40%內容,有興趣的同學可以購買來看看,歡迎糾錯。

PublishCover

Extension points exported contracts — how you extend this code

From (Interface)
特性,trait [2 implementers]
publication/code/chapter01/code_style.rs
Encoder (Interface)
编解码 trait [1 implementers]
code/chapter09/base58.rs
Encoder (Interface)
编解码 trait [1 implementers]
publication/code/chapter10/base58.rs
Decoder (Interface)
(no doc) [1 implementers]
code/chapter09/base58.rs
Encoder (Interface)
编码合解码 trait [1 implementers]
publication/code/chapter10/PasswdGenerator/encoder/src/base58.rs
Decoder (Interface)
(no doc) [1 implementers]
publication/code/chapter10/base58.rs
Decoder (Interface)
(no doc) [1 implementers]
publication/code/chapter10/PasswdGenerator/encoder/src/base58.rs

Core symbols most depended-on inside this repo

push
called by 174
publication/code/chapter04/lvec.rs
to_string
called by 131
publication/code/chapter10/conshash.rs
to_string
called by 113
code/chapter09/conshash.rs
len
called by 92
publication/code/chapter08/bst.rs
push
called by 81
code/chapter03/linked_list.rs
len
called by 59
code/chapter07/bst.rs
iter
called by 56
publication/code/chapter04/lvec.rs
iter
called by 43
code/chapter03/linked_list.rs

Shape

Method 900
Function 521
Class 272
Enum 18
Interface 7

Languages

Rust100%

Modules by API surface

publication/code/chapter08/rbtree.rs42 symbols
publication/code/chapter08/binary_tree.rs34 symbols
publication/code/chapter08/avl.rs33 symbols
publication/code/chapter08/bst.rs30 symbols
publication/code/chapter07/tim_sort.rs25 symbols
publication/code/chapter04/linked_list.rs23 symbols
publication/code/chapter04/lvec.rs22 symbols
code/chapter03/linked_list.rs22 symbols
publication/code/chapter06/hashmap.rs21 symbols
publication/code/chapter04/stack.rs20 symbols
publication/code/chapter04/list_stack.rs20 symbols
publication/code/chapter04/deque.rs20 symbols

For agents

$ claude mcp add RustBook \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact