2021年 Rust 行業調研報告

{"type":"doc","content":[{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"文前"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言是一門通用系統級編程語言,無GC且能保證內存安全、併發安全和高性能而著稱。自2008年開始由 Graydon Hoare 私人研發,2009年得到 Mozilla 贊助,2010年首次發佈 0.1.0 版本,用於Servo 引擎的研發,於 2015年5月15號發佈 1.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自發布以來,截止到2021 年的今天,經歷六年的發展,Rust 得到穩步上升,已逐漸趨於成熟穩定。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"至 2016 年開始,截止到 2021年,Rust 連續五年成爲"},{"type":"link","attrs":{"href":"https:\/\/insights.stackoverflow.com\/survey\/2020","title":"","type":null},"content":[{"type":"text","text":" StackOverflow 語言榜上最受歡迎的語言"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/d8\/3a\/d8ea7195e54a9yyfe16d1f7c310d3b3a.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021年 2 月 9 號,"},{"type":"text","marks":[{"type":"strong"}],"text":"Rust 基金會宣佈成立"},{"type":"text","text":"。"},{"type":"text","marks":[{"type":"strong"}],"text":"華爲、AWS、Google、微軟、Mozilla、Facebook 等科技行業領軍巨頭加入 Rust 基金會"},{"type":"text","text":",成爲白金成員,以致力於在全球範圍內推廣和發展 Rust 語言。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"那 Rust 語言到底有何魅力,能讓廣大開發者和巨頭公司這麼感興趣呢?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本文打算從 Rust 語言自身特性 和 Rust 行業應用盤點兩個方面的社區調研來嘗試來解答這個問題。供想選擇 Rust 的公司參考。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其實 Rust 生態還有很多內容,等待大家挖掘。本文內容還未覆蓋完全 Rust 生態的方方面面。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"註明: 本文中所羅列數據均來源互聯網公開內容。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"認識 Rust 語言"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"編程語言設計在兩個看似不可調和的願望之間長期存在着矛盾對立。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"安全 ( safe )。 我們想要強類型系統來靜態地排除大量錯誤。 我們要自動內存管理。我們想要數據封裝, 這樣我們就可以對私有變量執行不變的對象的表示形式,並確保它們將不會被不受信任的代碼破壞。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"控制 (control )。 至少對於 Web瀏覽器,操作系統,或遊戲引擎這樣的 "},{"type":"codeinline","content":[{"type":"text","text":"系統編程 (system programming)"}]},{"type":"text","text":" 程序,約束它們性能或資源是一個重要的問題,我們想了解數據的字節級表示。 我們想要用"},{"type":"codeinline","content":[{"type":"text","text":"底層語言 (low-level programming)"}]},{"type":"text","text":" 的編程技術優化我們程序的時間和空間的使用。 我們希望在需要時使用 "},{"type":"codeinline","content":[{"type":"text","text":"裸機"}]},{"type":"text","text":" 。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"然而,按照傳統的看法,魚和熊掌不能兼得。 Java 之類的語言使我們極大的安全保證,但代價是犧牲對底層的控制。結果,對於許多系統編程應用程序,唯一現實的選擇是使用一種像 C 或 C++ 提供細粒度的語言控制資源管理。 但是,獲得這種控制需要很高的成本。例如,微軟最近報告說,他們修復的 70% 安全漏洞都歸因於內存安全違規行爲 "},{"type":"link","attrs":{"href":"https:\/\/rustmagazine.github.io\/rust_magazine_2021\/chapter_4\/safe_system.html#33","title":"","type":null},"content":[{"type":"text","text":"33"}]},{"type":"text","text":",並且都是能被強類型系統排除的問題。同樣,Mozilla 報告指出,絕大多數關鍵 他們在Firefox中發現的錯誤是內存有關的"},{"type":"link","attrs":{"href":"https:\/\/rustmagazine.github.io\/rust_magazine_2021\/chapter_4\/safe_system.html#16","title":"","type":null},"content":[{"type":"text","text":"16 "}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果可以以某種方式兩全其美: 安全系統編程的同時對底層有控制權,豈不美哉。因此,Rust 語言應運而生。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"官方網如此介紹 Rust : 一門賦予每個人 構建可靠且高效軟件能力的語言。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言有三大優勢值得大家關注:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"高性能。Rust 速度驚人且內存利用率極高。由於沒有運行時和垃圾回收,它能夠勝任對性能要求特別高的服務,可以在嵌入式設備上運行,還能輕鬆和其他語言集成。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"可靠性。Rust 豐富的類型系統和所有權模型保證了內存安全和線程安全,讓您在編譯期就能夠消除各種各樣的錯誤。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"生產力。Rust 擁有出色的文檔、友好的編譯器和清晰的錯誤提示信息, 還集成了一流的工具——包管理器和構建工具, 智能地自動補全和類型檢驗的多編輯器支持, 以及自動格式化代碼等等。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 足夠底層,如果有必要,它可以像 C 一樣進行優化,以實現最高性能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"抽象層次越高,內存管理越方便,可用庫越豐富,Rust 程序代碼就越多,做的事情越多,但如果不進行控制,可能導致程序膨脹。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"然而,Rust 程序的優化也很不錯,有時候比 C 語言更好,C 語言適合在逐個字節逐個指針的級別上編寫最小的代碼,而 Rust 具有強大的功能,能夠有效地將多個函數甚至整個庫組合在一起。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是,最大的潛力是可以無畏(fearless)地並行化大多數 Rust 代碼,即使等價的 C 代碼並行化的風險非常高。在這方面,Rust 語言是比 C 語言更爲成熟的語言。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言也支持高併發零成本的異步編程,Rust 語言應該是首個支持異步編程的系統級語言。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"媲美 C \/ Cpp 的高性能"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Rust vs C"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/bd\/24\/bd0a19be7f71e5a2a6e6bbd0cf1c0a24.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Rust vs Cpp"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/35\/ee\/3568b321c7de5a445e024ff6faa707ee.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Rust vs Go"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/f7\/77\/f79007fb4e39a7929606b007fa7c4e77.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用 Rust 編寫的程序的運行時速度和內存使用量應該和用 C 編寫的程序差不多,但這兩種語言的總體編程風格不同,很難去概括它們的性能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"總的來說:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"抽象是一把雙刃劍。Rust 語言抽象程度比 C 語言更高,抽象會隱藏一些不是那麼優化的代碼,這意味着,默認實現的 Rust 代碼性能不是最好的。所以,你的 Rust 代碼必須經過優化才能達到媲美 C 的性能。Unsafe Rust 就是高性能出口。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 默認線程安全,消除數據競爭,讓多線程併發編程更具實用價值。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 在有些方面確實比 C 快。理論上,C 語言什麼都可以做。 但在實踐中,C 抽象能力比較低,不那麼現代化,開發效率比較低。只要開發者有無限時間和精力,就可以讓 C 語言在這些方面比 Rust 更快。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因爲 C 語言足以代表高性能,下面就分別談一下 C 和 Rust 的異同。如果你熟悉 C\/Cpp,也可以根據此對比來評估 Cpp 和 Rust。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Rust 和 C 都是硬件直接抽象"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 和 C 都是直接對硬件的抽象,都可看作一種「可移植彙編程序」。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 和 C 都能控制數據結構的內存佈局、整數大小、棧與堆內存分配、指針間接尋址等,並且一般都能翻譯成可理解的機器代碼,編譯器很少插入 \"魔法\"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"即便 Rust 比 C 有更高層次的結構,如迭代器、特質(trait)和智能指針,它們也被設計爲可預測地優化爲簡單的機器代碼(又稱 \"零成本抽象\")。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust的類型的內存佈局很簡單,例如,可增長的字符串"},{"type":"codeinline","content":[{"type":"text","text":"String"}]},{"type":"text","text":" 和 "},{"type":"codeinline","content":[{"type":"text","text":"Vec"}]},{"type":"text","text":" 正好是"},{"type":"codeinline","content":[{"type":"text","text":"{byte*, capacity, length}"}]},{"type":"text","text":"。Rust沒有任何像 Cpp裏的 移動 或 複製構造函數 這樣的概念,所以對象的傳遞保證不會比傳遞指針或 "},{"type":"codeinline","content":[{"type":"text","text":"memcpy"}]},{"type":"text","text":" 更復雜。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 借用檢查只是編譯器對代碼中引用的靜態分析。生命週期(lifetime)信息早就在 中級中間語言(MIR) 生成前完全抽離了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 中不使用傳統的異常處理,而是使用基於返回值的錯誤處理。但你也可以使用 恐慌(Panic)來處理像 Cpp 中那樣的異常行爲。它可以在編譯時被禁用"},{"type":"codeinline","content":[{"type":"text","text":"(panic = abort)"}]},{"type":"text","text":",但即便如此,Rust 也不喜歡 與 Cpp異常 或 longjmp 混在一起。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"同樣的 LLVM 後端"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust與LLVM有很好的整合,所以它支持鏈接時間優化,包括ThinLTO,甚至是跨越C\/C++\/Rust語言邊界的內聯。也有按配置優化(Profile-guided Optimization,PGO)的支持。儘管 rustc 比 clang 生成的LLVM IR更加冗長,但優化器仍然能夠很好地處理它。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"C 語言用 GCC 編譯比用 LLVM 更快,現在 Rust 社區也有人在開發 GCC 的 Rust 前端。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"理論上,因爲 Rust 有比C 更嚴格的不可變和別名規則,應該比 C 語言有更好的性能優化,但實際上並沒有起到這樣的效果。目前在LLVM中,超越 C語言的優化是一項正在進行的工作,所以Rust仍然沒有達到其全部潛力。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"都允許手工優化,但有一些小例外"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 的代碼足夠底層和可預測,可以通過手工調整它的優化到什麼樣的彙編代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 支持 SIMD ,對內聯和調用約定有很好的控制。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 和 C 語言足夠相似,C 語言的一些分析工具通常可以用於 Rust 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"總的來說,如果性能絕對關鍵,並且需要手工優化壓榨最後一點性能,那麼優化 Rus t 與 優化 C 語言並沒有什麼不同。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是在一些比較底層的特性,Rust 沒有特別好的替代方法。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"codeinline","content":[{"type":"text","text":"goto"}]},{"type":"text","text":"。Rust 中沒有提供"},{"type":"codeinline","content":[{"type":"text","text":"goto"}]},{"type":"text","text":",不過你可以使用循環的 break 標籤來代替。C 語言中一般使用 goto 來清理內存,但是 Rust 因爲有確定性析構功能,所以不需要 goto。然而有一個 非標準的 goto 擴展,對性能優化比較有用。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"棧內存分配"},{"type":"codeinline","content":[{"type":"text","text":"alloca"}]},{"type":"text","text":"和"},{"type":"codeinline","content":[{"type":"text","text":"C99"}]},{"type":"text","text":"可變長度數組,可以節省內存空間,減少內存分配次數。但這些即使在 C 語言中也是有爭議的,所以Rust遠離了它們。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Rust 相比 C 語言的一些開銷"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果沒有經過手工優化,Rust 因爲其抽象表達也會有一些開銷。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust缺乏隱式類型轉換和只用usize的索引,這導致開發者只能使用這種類型,哪怕只需要更小的數據類型。64位平臺上用usize做索引更容易優化,而不需要擔心未定義行爲,但多餘的bit位可能會給寄存器和內存帶來更大的壓力。而在 C 中,你可以選擇 32位類型。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 中的字符串,總是會攜帶指針和長度。但是很多 C 代碼中的函數只接收指針而不管大小。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"像 "},{"type":"codeinline","content":[{"type":"text","text":"for i in 0...len {arr[i]}"}]},{"type":"text","text":" 這樣的迭代,性能取決於 LLVM 優化器能否證明長度匹配。有時候,它不能,並且邊界檢查也會抑制自動矢量化。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"C 語言比較自由,對於內存有很多“聰明”的使用技巧,但在 Rust 裏就沒這麼自由了。但Rust仍然給了內存分配很多控制權,並且可以做一些基本的事情,比如內存池、將多個分配合併爲一個、預分配空間等等。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在不熟悉 Rust 借用檢查的情況下,可能會用 Clone 來逃避使用引用。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 的標準庫中 I\/O 是不帶緩存的,所以需要使用 "},{"type":"text","marks":[{"type":"strong"}],"text":"BufWriter"},{"type":"text","text":" 來包裝。這就是爲什麼有些人說 Rust 寫的代碼還不如 Python 快的原因,因爲 99% 的時間都用在 I\/O上了。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"可執行文件大小"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"每個操作系統都有一些內置的標準C庫,其中有大約30MB的代碼。C 語言的執行文件,可以“免費”使用這些庫。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一個小的 \"Hello World \" 級 C 可執行文件實際上不能打印任何東西,它只調用操作系統提供的printf。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"而 Rust 則不可以,Rust可執行文件會捆綁自己的標準庫(300KB或更多)。幸運的是,這只是一次性的開銷,可以減少。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於嵌入式開發,可以關閉標準庫,使用 \"no-std\",Rust將生成 \"裸 \"代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在每個函數的基礎上,Rust代碼的大小與C差不多,但有一個 \"泛型膨脹 \"的問題。泛型函數爲它們所使用的每一種類型都有優化的版本,所以有可能出現同一個函數有8個版本的情況,"},{"type":"link","attrs":{"href":"https:\/\/lib.rs\/cargo-bloat","title":"","type":null},"content":[{"type":"text","text":"cargo-bloat"}]},{"type":"text","text":" 庫有助於發現這些問題。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在Rust中使用依賴關係是非常容易的。與 JS\/npm 類似,現在推薦使用小型且單用途的包,但它們確實在不斷增加。"},{"type":"codeinline","content":[{"type":"text","text":"cargo-tree"}]},{"type":"text","text":" 命令對於刪減它們非常有用。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Rust 略勝 C 的一些地方"}]},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"爲了隱藏實現細節,C 庫經常返回不透明的數據結構指針,並確保結構的每個實例只有一個副本。它會消耗堆分配和指針間接尋址的成本。Rust 內置的隱私、單一所有權規則和編碼慣例允許庫暴露其對象,而不需要間接性,這樣,調用者可以決定將其放入堆(heap)上還是棧(stack)中。可以主動或徹底地優化棧上的對象。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"缺省情況下,Rust 可以將來自標準庫、依賴項和其他編譯單元的函數內聯。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 會對結構體字段進行重排,以優化內存佈局。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"字符串攜帶大小信息,使得長度檢查速度很快。並允許就地生成子串。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":5,"align":null,"origin":null},"content":[{"type":"text","text":"與 C++ 模板類似,Rust 中泛型函數會單態化,生成不同類型的副本,因此像 sort 這樣的函數和 HashMap 這樣的容器總是針對相應的類型進行優化。對於 C 語言,則必須在修改宏或者處理"},{"type":"codeinline","content":[{"type":"text","text":"void*"}]},{"type":"text","text":"和運行時變量大小的效率較低的函數之間做出選擇。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":6,"align":null,"origin":null},"content":[{"type":"text","text":"Rust的迭代器可以組合成鏈狀,作爲一個單元一起被優化。因此,你可以調用"},{"type":"codeinline","content":[{"type":"text","text":"it.buy().use().break().change().mail().upgrade()"}]},{"type":"text","text":",而不是對同一個緩存區多次寫入的一系列調用。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":7,"align":null,"origin":null},"content":[{"type":"text","text":"同樣,通過 Read 和 Write 接口,接收一些未緩存的流數據,在流中執行 CRC 校驗,然後將其轉碼、壓縮,再寫入網絡中,所有這些都可以在一次調用中完成。雖然 C 語言中應該也可以做到,但它沒有泛型和特質(trait),將很難做到。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":8,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 標準庫中內置高質量的容器和優化過的數據結構,比 C 使用起來更方便。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":9,"align":null,"origin":null},"content":[{"type":"text","text":"Rust的 serde 是世界上最快的JSON解析器之一,使用體驗非常棒。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Rust 比 C 明顯優越的地方"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主要是兩點:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 消除數據競爭,天生線程安全,解放多線程生產力,是 Rust 明顯比 C \/ Cpp 等語言優越的地方。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言支持異步高併發編程。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 支持 安全的編譯期計算。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"線程安全"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"即使是在第三方庫中,Rust 也會強制實現所有代碼和數據的線程安全,哪怕那些代碼的作者沒有注意線程安全。一切都遵循一個特定的線程安全保證,或者不允許跨線程使用。當你編寫的代碼不符合線程安全時,編譯器會準確地指出不安全之處。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 生態中已經有了很多庫,如數據並行、線程池、隊列、任務、無鎖數據結構等。有了這類組件的幫助,再加上類型系統強大的安全網,完全可以很輕鬆地實現併發\/並行化 Rust 程序。有些情況下,用 par_iter 代替 iter 是可以的,只要能夠進行編譯,就可以正常工作!這並不總是線性加速( 阿姆達爾定律(Amdahl's law)很殘酷),但往往是相對較少的工作就能加速 2~3 倍。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"延伸:阿姆達爾定律,一個計算機科學界的經驗法則,因 Gene Amdahl 而得名。它代表了處理器並行計算之後效率提升的能力。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在記錄線程安全方面,Rust 和 C 有一個有趣的不同。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 有一個術語表用於描述線程安全的特定方面,如 "},{"type":"codeinline","content":[{"type":"text","text":"Send"}]},{"type":"text","text":" 和 "},{"type":"codeinline","content":[{"type":"text","text":"Sync"}]},{"type":"text","text":"、"},{"type":"codeinline","content":[{"type":"text","text":"guards"}]},{"type":"text","text":" 和 "},{"type":"codeinline","content":[{"type":"text","text":"cell"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於 C 庫,沒有這樣的說法:“可以在一個線程上分配它,在另一個線程上釋放它,但不能同時從兩個線程中使用它”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"根據數據類型,Rust 描述了線程安全性,它可以泛化到所有使用它們的函數。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於 C 語言來說,線程安全只涉及單個函數和配置標誌。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 的保證通常是在編譯時提供的,至少是無條件的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於 C 語言,常見的是“僅當 turboblub 選項設置爲 7 時,這纔是線程安全的” (這句話並不是真的讓你去設置 turboblub 選項,因爲本來就沒有這個選項,所以 C 語言不會保證你線程安全 )。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"異步併發"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言支持 "},{"type":"codeinline","content":[{"type":"text","text":"async\/await"}]},{"type":"text","text":"異步編程模型。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該編程模型,基於一個叫做 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 的概念,,在 JavaScript 中也叫做 "},{"type":"codeinline","content":[{"type":"text","text":"Promise"}]},{"type":"text","text":"。"},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 表示一個尚未得出的值,你可以在它被解決(resolved)以得出那個值之前對它進行各種操作。在許多語言中,對 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 所做的工作並不多,這種實現支持很多特性比如組合器(Combinator),尤其是能在此基礎上實現更符合人體工程學的 "},{"type":"codeinline","content":[{"type":"text","text":"async"}]},{"type":"text","text":"\/"},{"type":"codeinline","content":[{"type":"text","text":"await"}]},{"type":"text","text":" 語法。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 可以表示各種各樣的東西,尤其適用於表示異步 I\/O :當你發起一次網絡請求時,你將立即獲得一個 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 對象,而一旦網絡請求完成,它將返回任何響應可能包含的值;你也可以表示諸如“超時”之類的東西,“超時”其實就是一個在過了特定時間後被解決的 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" ;甚至不屬於 I\/O 的工作或者需要放到某個線程池中運行的CPU密集型的工作,也可以通過一個 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 來表示,這個 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 將會在線程池完成工作後被解決。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"codeinline","content":[{"type":"text","marks":[{"type":"strong"}],"text":"Future"}]},{"type":"text","marks":[{"type":"strong"}],"text":" 存在的問題"},{"type":"text","text":" 是它在大多數語言中的表示方式是這種基於回調的方法,使用這種方式時,你可以指定在 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 被解決之後運行什麼回調函數。也就是說, "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 負責弄清楚什麼時候被解決,無論你的回調是什麼,它都會運行;而所有的不便也都建立在此模型上,它非常難用,因爲已經有很多開發者進行了大量的嘗試,發現他們不得不寫很多分配性的代碼以及使用動態派發;實際上,你嘗試調度的每個回調都必須獲得自己獨立的存儲空間,例如 crate 對象、堆內存分配,這些分配以及動態派發無處不在。這種方法沒有滿足零成本抽象的第二個原則,如果你要使用它,它將比你自己寫要慢很多,那你爲什麼還要用它。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 中的方案有所不同。不是由 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 來調度回調函數,而是由一個被稱爲執行器(executor)的組件去輪詢 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":"。而 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 可能返回“尚未準備就緒(Pending)”,也可能被解決就返回“已就緒(Ready)”。該模型有很多優點。其中一個優點是,你可以非常容易地取消 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" ,因爲取消 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 只需要停止持有 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":"。而如果採用基於回調的方法,要通過調度來取消並使其停止就沒這麼容易了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"同時它還能夠使我們在程序的不同部分之間建立真正清晰的抽象邊界,大多數其他 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 庫都帶有事件循環(event loop),這也是調度 你的"},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 執行 I\/O 的方法,但實際上你對此沒有任何控制權。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"而在 Rust 中,各組件之間的邊界非常整潔,執行器(executor)負責調度你的 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" ,反應器(reactor)處理所有的 I\/O ,然後是你的實際代碼。因此最終用戶可以自行決定使用什麼執行器,使用他們想使用的反應器,從而獲得更強的控制力,這在系統編程語言中真的很重要。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"而此模型最重要的真正優勢在於,它使我們能夠以一種真正零成本的完美方式實現這種狀態機式的 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 。也就是當你編寫的 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 代碼被編譯成實際的本地(native)代碼時,它就像一個狀態機;在該狀態機中,每次 I\/O 的暫停點都有一個變體(variant),而每個變體都保存了恢復執行所需的狀態。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"而這種 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 抽象的真正有用之處在於,我們可以在其之上構建其他 API 。可以通過將這些組合器方法應用於 "},{"type":"codeinline","content":[{"type":"text","text":"Future"}]},{"type":"text","text":" 來構建狀態機,它們的工作方式類似於迭代器("},{"type":"codeinline","content":[{"type":"text","text":"Iterator"}]},{"type":"text","text":")的適配器(如 "},{"type":"codeinline","content":[{"type":"text","text":"filter"}]},{"type":"text","text":"、"},{"type":"codeinline","content":[{"type":"text","text":"map"}]},{"type":"text","text":")。但是這種方式是有一些缺點的,尤其是諸如嵌套回調之類,可讀性非常差。所以才需要實現 "},{"type":"codeinline","content":[{"type":"text","text":"async"}]},{"type":"text","text":" \/ "},{"type":"codeinline","content":[{"type":"text","text":"await"}]},{"type":"text","text":"異步語法。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前 Rust 生態中,已經有了成熟的 "},{"type":"link","attrs":{"href":"https:\/\/tokio.rs\/","title":"","type":null},"content":[{"type":"text","text":"tokio"}]},{"type":"text","text":" 運行時生態,支持 epoll 等異步 I\/O。如果你想用 io_uring ,也可以使用 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/DataDog\/glommio","title":"","type":null},"content":[{"type":"text","text":"Glommio"}]},{"type":"text","text":" ,或者等待 tokio 對 io_uring 的支持。甚至,你可以使用 smol 運行時提供的 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/smol-rs\/async-executor","title":"","type":null},"content":[{"type":"text","text":"async_executor"}]},{"type":"text","text":" 和 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/smol-rs\/async-io","title":"","type":null},"content":[{"type":"text","text":"async-io"}]},{"type":"text","text":" 來構建你自己的運行時。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"編譯期計算"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 可以支持類似於 Cpp 那樣的 編譯期常量求值。這一點是明顯比C優越的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雖然目前功能還不如 Cpp 那樣強大,但還在不斷的維護中。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲什麼 Rust 中支持 編譯期計算這麼謹慎呢?因爲Rust 編譯期求值是必須要保證安全的,所以有很多考慮。Rust 編譯期求值不像 Cpp 那樣自由且容易濫用。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"可靠性"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020 年 6月份,來自3所大學的5位學者在ACM SIGPLAN國際會議(PLDI'20)上發表了一篇研究成果,針對近幾年使用Rust語言的開源項目中的安全缺陷進行了全面的調查。這項研究調查了5個使用Rust語言開發的軟件系統,5個被廣泛使用的Rust庫,以及兩個漏洞數據庫。調查總共涉及了850處unsafe代碼使用、70個內存安全缺陷、100個線程安全缺陷。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在調查中,研究員不光查看了所有漏洞數據庫中報告的缺陷和軟件公開報告的缺陷,還查看了所有開源軟件代碼倉庫中的提交記錄。通過人工的分析,他們界定出提交所修復的BUG類型,並將其歸類到相應的內存安全\/線程安全問題中。所有被調查過的問題都被整理到了公開的Git倉庫中:"},{"type":"link","attrs":{"href":"https:\/\/github.com\/system-pclub\/rust-study","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/system-pclub\/rust-study"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"調查結果說明:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"Rust語言的safe代碼對於空間和時間內存安全問題的檢查非常有效,所有穩定版本中出現的內存安全問題都和unsafe代碼有關。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"雖然內存安全問題都和unsafe代碼有關,但大量的問題同時也和safe代碼有關。有些問題甚至源於safe代碼的編碼錯誤,而不是unsafe代碼。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"線程安全問題,無論阻塞還是非阻塞,都可以在safe代碼中發生,即使代碼完全符合Rust語言的規則。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"大量問題的產生是由於編碼人員沒有正確理解Rust語言的生命週期規則導致的。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":5,"align":null,"origin":null},"content":[{"type":"text","text":"有必要針對Rust語言中的典型問題,建立新的缺陷檢測工具。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"那麼這份調查報告背後 Rust 的安全性是如何保證的呢?Unsafe Rust 又是爲什麼 Unsafe 呢?"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"所有權: Rust 語言內存安全機制"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 的設計深深地吸取了關於安全系統編程的學術研究的精髓。特別是,與其他主流語言相比,Rust 設計的最大特色在於採用了"},{"type":"text","marks":[{"type":"strong"}],"text":"所有權類型系統"},{"type":"text","text":"(在學術文獻中通常稱爲"},{"type":"text","marks":[{"type":"italic"}],"text":"仿射"},{"type":"text","text":"或"},{"type":"text","marks":[{"type":"italic"}],"text":"子結構"},{"type":"text","text":"類型系統"},{"type":"link","attrs":{"href":"https:\/\/rustmagazine.github.io\/rust_magazine_2021\/chapter_4\/safe_system.html#36","title":"","type":null},"content":[{"type":"text","text":"36"}]},{"type":"text","text":")。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所有權機制,就是Rust 語言藉助類型系統,承載其“內存安全”的思想,表達出來的安全編程語義和模型。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所有權機制要解決的內存不安全問題包括:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"引用空指針。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"使用未初始化內存。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"釋放後使用,也就是使用懸垂指針。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"緩衝區溢出,比如數組越界。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":5,"align":null,"origin":null},"content":[{"type":"text","text":"非法釋放已經釋放過的指針或未分配的指針,也就是重複釋放。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"注意,內存泄露不屬於內存安全問題範疇,所以 Rust 也不解決內存泄露問題。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"爲了保證內存安全,Rust 語言建立了嚴格的安全內存管理模型:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所有權系統。每個被分配的內存都有一個獨佔其所有權的指針。只有當該指針被銷燬時,其對應的內存才能隨之被釋放。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"借用和生命週期。每個變量都有其生命週期,一旦超出生命週期,變量就會被自動釋放。如果是借用,則可以通過標記生命週期參數供編譯器檢查的方式,防止出現懸垂指針,也就是釋放後使用的情況。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其中所有權系統還包括了從現代 C++ 那裏借鑑的 RAII 機制,這是 Rust 無 GC 但是可以安全管理內存的基石。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"建立了安全內存管理模型之後,再用類型系統表達出來即可。"},{"type":"text","marks":[{"type":"strong"}],"text":"Rust 從 Haskell 的類型系統那裏借鑑了以下特性:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"沒有空指針"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"默認不可變"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"表達式"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"高階函數"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代數數據類型"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"模式匹配"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"泛型"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"trait 和關聯類型"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本地類型推導"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"爲了實現內存安全,Rust 還具備以下獨有的特性:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"仿射類型(Affine Type),該類型用來表達 Rust 所有權中的 Move 語義。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"借用、生命週期。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"藉助類型系統的強大,Rust 編譯器可以在編譯期對類型進行檢查,看其是否滿足安全內存模型,在編譯期就能發現內存不安全問題,有效地阻止未定義行爲的發生。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"內存安全的 Bug 和併發安全的 Bug 產生的內在原因是相同的,都是因爲內存的不正當訪問而造成的。同樣,利用裝載了所有權的強大類型系統,Rust 還解決了併發安全的問題。Rust 編譯器會通過靜態檢查分析,在編譯期就檢查出多線程併發代碼中所有的數據競爭問題。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Unsafe Rust :劃分安全邊界"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"**爲了和現有的生態系統良好地集成,**Rust 支持非常方便且零成本的 FFI 機制,兼容 C-ABI,並且從語言架構層面上將 Rust 語言分成 Safe Rust 和 Unsafe Rust 兩部分。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其中 Unsafe Rust 專門和外部系統打交道,比如操作系統內核。之所以這樣劃分,是因爲 Rust 編譯器的檢查和跟蹤是有能力範圍的,它不可能檢查到外部其他語言接口的安全狀態,所以只能靠開發者自己來保證安全。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 的最終目標並不是完全消除那些危險點,因爲在某種程度上,我們需要能夠訪問內存和其他資源。實際上,Rust 的目標是將所有的unsafe元素抽象出來。在考慮安全性時,你需要考慮“攻擊面”,或者我們可以與程序的哪些部分進行交互。像解析器這樣的東西是一個很大的攻擊面,因爲:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"它們通常可以被攻擊者訪問;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"攻擊者提供的數據可以直接影響解析通常需要的複雜邏輯。"}]}]},{"type":"listitem","attrs":{"listStyle":"none"},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你可以進一步分解,將傳統的攻擊面分解成“攻擊面”(可以直接影響程序代碼的部分)和“安全層”,這部分代碼是攻擊面依賴的代碼,但是無法訪問,而且可能存在潛在的 Bug。在 C 語言中,它們是一樣的:C 語言中的數組根本不是抽象的,所以如果你讀取了可變數量的項,就需要確保所有的不變量都保持不變,因爲這是在不安全層中操作,那裏可能會發生錯誤。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所以,Rust 提供了 "},{"type":"codeinline","content":[{"type":"text","text":"unsafe"}]},{"type":"text","text":" 關鍵字和"},{"type":"codeinline","content":[{"type":"text","text":"unsafe"}]},{"type":"text","text":"塊,顯式地將安全代碼和訪問外部接口的不安全代碼進行了區分,也爲開發者調試錯誤提供了方便。Safe Rust 表示開發者將信任編譯器能夠在編譯時保證安全,而 Unsafe Rust 表示讓編譯器信任開發者有能力保證安全。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有人的地方就有 Bug。Rust 語言通過精緻的設計,將機器可以檢查控制的部分都交給編譯器來執行,而將機器無法控制的部分交給開發者自己來執行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Safe Rust 保證的是編譯器在編譯時最大化地保障內存安全,阻止未定義行爲的發生。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Unsafe Rust 用來提醒開發者,此時開發的代碼有可能引起未定義行爲,請謹慎!人和編譯器共享同一個“安全模型”,相互信任,彼此和諧,以此來最大化地消除人產生 Bug 的可能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Unsafe Rust,是Rust的安全邊界。世界的本質就是Unsafe的。你無法避免它。還有人說,因爲Unsafe Rust的存在,所以也不見得能比C\/C++安全到哪裏去?Unsafe Rust確實和C\/C++一樣,要靠人來保證它的安全。但它對人的要求更高。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"它也給了開發者一個Unsafe的邊界,這其實也是一種安全邊界。它把你代碼裏的雷區,顯式地標記了出來。團隊代碼裏review的話,可以更快地發現問題。這本身就是一種安全。而反觀C++,你寫出的每一行代碼都是Unsafe的,因爲它沒有像Rust這樣明顯的界限(Unsafe 塊)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"以下是我總結的五條使用Unsafe的簡單規範,方便大家做權衡:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"能用Safe Rust就用Safe Rust;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"爲了性能可以使用Unsafe Rust;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"在使用Unsafe Rust的時候確保不要產生UB,並且儘量判斷其安全邊界,抽象爲 Safe 方法;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"如果無法抽象爲Safe,需要標註爲Unsafe,並配以產生UB的條件文檔;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":5,"align":null,"origin":null},"content":[{"type":"text","text":"對於Unsafe的代碼,大家可以重點review。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所以,Unsafe 使用不當也會引發內存安全或邏輯 Bug 。所以,學習 如何對 Unsafe Rust 進行安全抽象至關重要。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不過,Rust 社區生態中有一個 Rust 安全工作組,該組提供 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/RustSec\/rustsec","title":"","type":null},"content":[{"type":"text","text":"cargo-audit等一系列工具"}]},{"type":"text","text":",並且維護"},{"type":"link","attrs":{"href":"https:\/\/rustsec.org\/advisories\/","title":"","type":null},"content":[{"type":"codeinline","content":[{"type":"text","text":"RustSecurity"}]},{"type":"text","text":" 安全數據庫庫"}]},{"type":"text","text":"中記錄的"},{"type":"codeinline","content":[{"type":"text","text":"Rust"}]},{"type":"text","text":"生態社區中發現的安全問題。可以方便地檢查 Rust 項目中依賴庫的安全問題。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"生產力"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"編程語言生產力,大概可以通過以下三個方面來評估:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"學習曲線。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"語言工程能力。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"領域生態。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"學習曲線"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"學習曲線的高低,依個人水平不同而不同。以下羅列了不同基礎學習 Rust 應該注意的地方。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"完全零基礎的開發者:掌握計算機基礎體系知識結構,理解Rust語言和硬件\/OS層的抽象,理解Rust語言核心概念、以及它的抽象模式,選擇Rust語言的某個適用領域進行實操訓練,通過實踐來提升Rust語言的熟練度和理解深度,同時掌握領域知識。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"有C語言基礎:由於C語言開發者對高級語言的抽象不是很理解,所以着重瞭解掌握Rust所有權機制,包括所有權的語義,生命週期和借用檢查。瞭解Rust語言的抽象模式,主要是類型和trait;以及Rust本身的的OOP和函數式語言特性。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"有C++基礎:C++開發者對於Rust語言的所有權有很好的理解能力,主要精力放在Rust的抽象模式和函數式語言特性上。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"有Java\/Python\/Ruby基礎:着重理解攻克Rust所有權機制、抽象模式、函數式編程語言特性。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":5,"align":null,"origin":null},"content":[{"type":"text","text":"有Go基礎:Go語言開發者比較容易理解Rust的類型和trait抽象模式,但Go也是GC語言,所以所有權機制和函數式語言特性是他們的學習重點。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":6,"align":null,"origin":null},"content":[{"type":"text","text":"有Haskell基礎:Haskell系的開發者對Rust語言函數式特性能很好的理解,主要攻克所有權機制和OOP語言特性。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所以,對於有一定基礎的開發者來說,學習Rust語言要掌握的幾個關鍵概念有:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1、Rust所有權機制,包括所有權的語義,生命週期和借用檢查"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"​所有權機制是Rust語言最核心的特性,它保證了在沒有垃圾回收機制下的內存安全,所以對於習慣了GC的開發者,理解Rust的所有權是最關鍵的一環,切記這三點:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust中的每一個值都有一個被稱爲其所有者 (owner)的變量。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"值有且只有一個所有者。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當所有者(變量)離開作用域,這個值將被丟棄。這其中又涉及到生命週期和借用檢查等概念,是相對比較難啃的一塊硬骨頭。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2、Rust語言的抽象模式,主要是類型和trait。trait借鑑了Haskell中的Typeclass,它是對類型行爲的抽象,可以通俗地類比爲其他編程語言裏的接口,它告訴編譯器一個類型必須提供哪些功能語言特性。使用時要遵循一致性,不能定義相互衝突的實現。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3、OOP語言特性。熟悉面向對象編程(OOP)的常見的四個特性:對象、封裝、繼承和多態,可以更好地理解Rust的一些特性,比如impl、pub、trait等等。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"4、函數式語言特性。Rust語言的設計深受函數式編程的影響,看到函數式特性,數學不好的人可能會望而卻步,因爲函數式編程語言的最大特點是把運算過程儘量寫成一系列嵌套的函數調用,在Rust中,掌握閉包和迭代器是編寫函數式語言風格的高性能Rust代碼的重要一環。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"語言工程能力"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 已經爲開發工業級產品做足了準備。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了保證安全性,Rust 引入了強大的類型系統和所有權系統,不僅保證內存安全,還保證了併發安全,同時還不會犧牲性能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了保證支持硬實時系統,Rust 從 C++那裏借鑑了確定性析構、RAII 和智能指針,用於自動化地、確定性地管理內存,從而避免了 GC 的引入,因而就不會有“世界暫停”的問題了。這幾項雖然借鑑自 C++,但是使用起來比 C++更加簡潔。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了保證程序的健壯性,Rust 重新審視了錯誤處理機制。日常開發中一般有三類非正常情況:失敗、錯誤和異常。但是像 C 語言這種面向過程的語言,開發者只能通過返回值、goto 等語句進行錯誤處理,並且沒有統一的錯誤處理機制。而 C++和 Java 這種高級語言雖然引入了異常處理機制,但沒有專門提供能夠有效區分正常邏輯和錯誤邏輯的語法,而只是統一全局進行處理,導致開發者只能將所有的非正常情況都當作異常去處理,這樣不利於健壯系統的開發。並且異常處理還會帶來比較大的性能開銷。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言針對這三類非正常情況分別提供了專門的處理方式,讓開發者可以分情況去選擇。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於失敗的情況,可以使用斷言工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於錯誤,Rust 提供了基於返回值的分層錯誤處理方式,比如 Option 可以用來處理可能存在空值的情況,而 Result 就專門用來處理可以被合理解決並需要傳播的錯誤。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於異常,Rust 將其看作無法被合理解決的問題,提供了線程恐慌機制,在發生異常的時候,線程可以安全地退出。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過這樣精緻的設計,開發者就可以從更細的粒度上對非正常情況進行合理處理,最終編寫出更加健壯的系統。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"爲了提供靈活的架構能力"},{"type":"text","text":",Rust 使用 特質(trait) 來作爲零成本抽象的基礎。特質 面向組合而非繼承,讓開發者可以靈活地架構 緊耦合 和 松耦合的系統。Rust 也提供了 泛型 來表達類型抽象,結合 trait 特性,讓 Rust 擁有靜態多態 和 代碼複用 的能力。泛型和trait 讓你可以靈活使用各種設計模式來對系統架構進行重塑。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"爲了提供強大的語言擴展能力和開發效率"},{"type":"text","text":",Rust 引入了基於宏的元編程機制。Rust提供了兩種宏,分別是聲明宏和過程宏。聲明宏的形式和C的宏替換類似,區別在於Rust會對宏展開後的代碼進行檢查,在安全方面更有優勢。過程宏則讓 Rust 在代碼複用、代碼生成擁有強大的能力。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了和現有的生態系統良好地集成,Rust 支持非常方便且零成本的 FFI 機制,兼容 C-ABI,並且從語言架構層面上將 Rust 語言分成 Safe Rust 和 Unsafe Rust 兩部分。其中 Unsafe Rust 專門和外部系統打交道,比如操作系統內核。之所以這樣劃分,是因爲 Rust 編譯器的檢查和跟蹤是有能力範圍的,它不可能檢查到外部其他語言接口的安全狀態,所以只能靠開發者自己來保證安全。Unsafe Rust 提供了 unsafe 關鍵字和 unsafe 塊,顯式地將安全代碼和訪問外部接口的不安全代碼進行了區分,也爲開發者調試錯誤提供了方便。Safe Rust 表示開發者將信任編譯器能夠在編譯時保證安全,而 Unsafe Rust 表示讓編譯器信任開發者有能力保證安全。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有人的地方就有 Bug。Rust 語言通過精緻的設計,將機器可以檢查控制的部分都交給編譯器來執行,而將機器無法控制的部分交給開發者自己來執行。Safe Rust 保證的是編譯器在編譯時最大化地保障內存安全,阻止未定義行爲的發生。Unsafe Rust 用來提醒開發者,此時開發的代碼有可能引起未定義行爲,請謹慎!人和編譯器共享同一個“安全模型”,相互信任,彼此和諧,以此來最大化地消除人產生 Bug 的可能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了讓開發者更方便地相互協作,Rust 提供了非常好用的包管理器"},{"type":"link","attrs":{"href":"https:\/\/doc.rust-lang.org\/cargo\/guide\/index.html","title":"","type":null},"content":[{"type":"text","text":"Cargo"}]},{"type":"text","text":"。Rust 代碼是以包(crate)爲編譯和分發單位的,Cargo 提供了很多命令,方便開發者創建、構建、分發、管理自己的包。Cargo 也提供插件機制,方便開發者編寫自定義的插件,來滿足更多的需求。比如官方提供的 rustfmt 和 clippy 工具,分別可以用於自動格式化代碼和發現代碼中的“壞味道”。再比如,rustfix 工具甚至可以幫助開發者根據編譯器的建議自動修復出錯的代碼。Cargo 還天生擁抱開源社區和 Git,支持將寫好的包一鍵發佈到 crates.io 網站,供其他人使用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了方便開發者學習 Rust,Rust 官方團隊做出瞭如下努力:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"獨立出專門的社區工作組,編寫官方 "},{"type":"text","marks":[{"type":"italic"}],"text":"Rust Book"},{"type":"text","text":",以及其他各種不同深度的文檔,比如編譯器文檔、nomicon book 等。甚至組織免費的社區教學活動 Rust Bridge,大力鼓勵社區博客寫作,等等。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言的文檔支持 Markdown 格式,因此 Rust 標準庫文檔表現力豐富。生態系統內很多第三方包的文檔的表現力也同樣得以提升。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"提供了非常好用的在線 Playground 工具,供開發者學習、使用和分享代碼。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言很早就實現了自舉,方便學習者通過閱讀源碼瞭解其內部機制,甚至參與貢獻。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 核心團隊一直在不斷改進 Rust,致力於提升 Rust 的友好度,極力降低初學者的心智負擔,減緩學習曲線。比如引入 NLL 特性來改進借用檢查系統,使得開發者可以編寫更加符合直覺的代碼。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雖然從 Haskell 那裏借鑑了很多類型系統相關的內容,但是 Rust 團隊在設計和宣傳語言特性的時候,會特意地去學術化,讓 Rust 的概念更加親民。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在類型系統基礎上提供了混合編程範式的支持,提供了強大而簡潔的抽象表達能力,極大地提升了開發者的開發效率。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"提供更加嚴格且智能的編譯器。基於類型系統,編譯器可以嚴格地檢查代碼中隱藏的問題。Rust 官方團隊還在不斷優化編譯器的診斷信息,使得開發者可以更加輕鬆地定位錯誤,並快速理解錯誤發生的原因。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了方便 Rust 開發者提升開發效率,Rust 社區還提供了強大的 IDE 支持。VSCode\/Vim\/Emacs + Rust Analyzer 成爲了 Rust 開發的標配。當然 JetBrains家族的 IDEA\/ Clion 也對 Rust 支持十分強力。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Rust 與 開源"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言自身作爲一個開源項目,也是現代開源軟件中的一顆璀璨的明珠。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在 Rust 之前誕生的所有語言,都僅僅用於商用開發,但是 Rust 語言改變了這一狀況。對於 Rust 語言來說,Rust 開源社區也是語言的一部分。同時,Rust 語言也是屬於社區的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 團隊由 Mozilla 和非 Mozilla 成員組成,至今 Rust 項目貢獻者已經超過了 1900 人。Rust 團隊分爲核心組和其他領域工作組,針對 Rust 2018 的目標,Rust 團隊被分爲了嵌入式工作組、CLI 工作組、網絡工作組以及 WebAssembly 工作組,另外還有生態系統工作組和社區工作組等。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這些領域中的設計都會先經過一個 RFC 流程,對於一些不需要經過 RFC 流程的更改,只需要給 Rust 項目庫提交 Pull Request 即可。所有過程都是對社區透明的,並且貢獻者都可參與評審,當然,最終決策權歸核心組及相關領域工作組所有。後面爲了精簡 FCP流程,也引入了 MCP。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 團隊維護三個發行分支:穩定版(Stable)、測試版(Beta)和開發版(Nightly)。**其中穩定版和測試版每 6 周發佈一次。標記爲不穩定(Unstable)和特性開關(Feature Gate)的語言特性或標準庫特性只能在開發版中使用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在 Rust 基金會成立以後,Rust 團隊也在不斷探索新的開源治理方案。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Rust 語言的不足"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 雖然有很多優勢,但肯定也存在一些缺點。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 編譯速度很慢。雖然 Rust 官方也一直在改進 Rust 編譯速度,包括增量編譯支持,引入新的編譯後端( cranelift ),並行編譯等措施,但還是慢。而且 增量編譯目前也有 Bug。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"學習曲線陡峭。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"IDE 支持不夠完善。比如,對宏代碼的支持不是很好。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"缺乏針對 Rust 語言特有內存不安全問題的各種檢測工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":5,"align":null,"origin":null},"content":[{"type":"text","text":"針對某些場景、架構和硬件生態支持不是很完善,這其實是需要投入人力和硬件成本來支持了,需要社區和生態的共同努力。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Rust 生態基礎庫和工具鏈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 生態日趨豐富,很多基礎庫和框架都會以 包(crate) 的方式發佈到 "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates","title":"","type":null},"content":[{"type":"text","text":"crates.io"}]},{"type":"text","text":" ,截止目前,crates.io 上面已經有 "},{"type":"text","marks":[{"type":"strong"}],"text":"62981"},{"type":"text","text":" 個 crate,總下載量已經達到 "},{"type":"text","marks":[{"type":"strong"}],"text":"7,654,973,261"},{"type":"text","text":"次。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"按包的使用場景分類,Crates.io 最流行的幾個場景依次如下:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"命令行工具 (3133 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"no-std 庫 (2778 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"開發工具(測試\/ debug\/linting\/性能檢測等, 2652 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Web 編程 (1776 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"API 綁定 (方便 Rust 使用的特定 api 包裝,比如 http api、ffi 相關api等,1738 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"網絡編程 (1615 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"數據結構 (1572 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"嵌入式開發 (1508 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"加密技術(1498 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"異步開發(1487 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"算法 (1200 crates)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"科學計算(包括物理、生物、化學、地理、機器學習等,1100 crates)"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"除此之外,還有 WebAssembly 、編碼、文本處理、併發、GUI、遊戲引擎、可視化、模版引擎、解析器、操作系統綁定 等其他分類,也有不少庫。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"常用知名基礎庫和工具鏈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其中已經湧現出不少優秀的基礎庫,都可以在 crates.io 首頁裏看到。這裏羅列出一些:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"序列化\/反序列化:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/serde","title":"","type":null},"content":[{"type":"text","text":"Serde"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"命令行開發:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/clap","title":"","type":null},"content":[{"type":"text","text":"clap "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/structopt","title":"","type":null},"content":[{"type":"text","text":"structopt"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"異步\/Web\/網絡開發: "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tokio","title":"","type":null},"content":[{"type":"text","text":"tokio "}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tracing","title":"","type":null},"content":[{"type":"text","text":"tracing "}]},{"type":"text","text":" \/"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/async-trait","title":"","type":null},"content":[{"type":"text","text":"async-trait "}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tower","title":"","type":null},"content":[{"type":"text","text":"tower "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/async-std","title":"","type":null},"content":[{"type":"text","text":"async-std "}]},{"type":"text","text":" "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tonic","title":"","type":null},"content":[{"type":"text","text":"tonic "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/actix-web","title":"","type":null},"content":[{"type":"text","text":"actix-web "}]},{"type":"text","text":"\/"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/smol","title":"","type":null},"content":[{"type":"text","text":"smol "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/surf","title":"","type":null},"content":[{"type":"text","text":"surf "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/async-graphql","title":"","type":null},"content":[{"type":"text","text":"async-graphql "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/warp","title":"","type":null},"content":[{"type":"text","text":"warp \/"}]},{"type":"text","text":" "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tungstenite","title":"","type":null},"content":[{"type":"text","text":"tungstenite "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/encoding_rs","title":"","type":null},"content":[{"type":"text","text":"encoding_rs "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/loom","title":"","type":null},"content":[{"type":"text","text":"loom "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/SergioBenitez\/Rocket","title":"","type":null},"content":[{"type":"text","text":"Rocket"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"FFi 開發: "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/libc","title":"","type":null},"content":[{"type":"text","text":"libc "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/winapi","title":"","type":null},"content":[{"type":"text","text":"winapi "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/bindgen","title":"","type":null},"content":[{"type":"text","text":"bindgen "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/pyo3","title":"","type":null},"content":[{"type":"text","text":"pyo3 "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/num_enum","title":"","type":null},"content":[{"type":"text","text":"num_enum "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/jni","title":"","type":null},"content":[{"type":"text","text":"jni "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/rustler_sys","title":"","type":null},"content":[{"type":"text","text":"rustler_sys"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/cxx","title":"","type":null},"content":[{"type":"text","text":"cxx "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/cbindgen","title":"","type":null},"content":[{"type":"text","text":"cbindgen "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/autocxx-bindgen","title":"","type":null},"content":[{"type":"text","text":"autocxx-bindgen "}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"API 開發: "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/jsonwebtoken","title":"","type":null},"content":[{"type":"text","text":"jsonwebtoken "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/validator","title":"","type":null},"content":[{"type":"text","text":"validator "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tarpc","title":"","type":null},"content":[{"type":"text","text":"tarpc "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/nats","title":"","type":null},"content":[{"type":"text","text":"nats "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tonic","title":"","type":null},"content":[{"type":"text","text":"tonic"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/protobuf","title":"","type":null},"content":[{"type":"text","text":"protobuf "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/hyper","title":"","type":null},"content":[{"type":"text","text":"hyper "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/httparse","title":"","type":null},"content":[{"type":"text","text":"httparse "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/reqwest","title":"","type":null},"content":[{"type":"text","text":"reqwest "}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/url","title":"","type":null},"content":[{"type":"text","text":"url "}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"解析器:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/nom","title":"","type":null},"content":[{"type":"text","text":"nom "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/pest","title":"","type":null},"content":[{"type":"text","text":"pest "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/csv","title":"","type":null},"content":[{"type":"text","text":"csv "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/combine","title":"","type":null},"content":[{"type":"text","text":"combine "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/wasmparser","title":"","type":null},"content":[{"type":"text","text":"wasmparser "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/ron","title":"","type":null},"content":[{"type":"text","text":"ron "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/lalrpop","title":"","type":null},"content":[{"type":"text","text":"lalrpop "}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"密碼學: "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/openssl","title":"","type":null},"content":[{"type":"text","text":"openssl "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/ring","title":"","type":null},"content":[{"type":"text","text":"ring "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/hmac","title":"","type":null},"content":[{"type":"text","text":"hmac "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/ctz\/rustls","title":"","type":null},"content":[{"type":"text","text":"rustls"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/orion-rs\/orion","title":"","type":null},"content":[{"type":"text","text":"orion"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/cossacklabs\/themis","title":"","type":null},"content":[{"type":"text","text":"themis"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/RustCrypto","title":"","type":null},"content":[{"type":"text","text":"RustCrypto"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"WebAssembly: "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/wasm-bindgen","title":"","type":null},"content":[{"type":"text","text":"wasm-bindgen"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/wasmer","title":"","type":null},"content":[{"type":"text","text":"wasmer "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/wasmtime","title":"","type":null},"content":[{"type":"text","text":"wasmtime "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/yew","title":"","type":null},"content":[{"type":"text","text":"yew "}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"數據庫開發: "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/diesel","title":"","type":null},"content":[{"type":"text","text":"diesel "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/sqlx","title":"","type":null},"content":[{"type":"text","text":"sqlx "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/rocksdb","title":"","type":null},"content":[{"type":"text","text":"rocksdb "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/mysql","title":"","type":null},"content":[{"type":"text","text":"mysql "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/elasticsearch","title":"","type":null},"content":[{"type":"text","text":"elasticsearch "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/rbatis","title":"","type":null},"content":[{"type":"text","text":"rbatis "}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"併發:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/crossbeam","title":"","type":null},"content":[{"type":"text","text":"crossbeam "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/parking_lot","title":"","type":null},"content":[{"type":"text","text":"parking_lot "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/crossbeam-channel","title":"","type":null},"content":[{"type":"text","text":"crossbeam-channel "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/rayon","title":"","type":null},"content":[{"type":"text","text":"rayon "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/concurrent-queue","title":"","type":null},"content":[{"type":"text","text":"concurrent-queue"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/threadpool","title":"","type":null},"content":[{"type":"text","text":"threadpool "}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/flume","title":"","type":null},"content":[{"type":"text","text":"flume "}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"嵌入式開發:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/embedded-hal","title":"","type":null},"content":[{"type":"text","text":"embedded-hal "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/cortex-m","title":"","type":null},"content":[{"type":"text","text":"cortex-m "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/bitvec","title":"","type":null},"content":[{"type":"text","text":"bitvec "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/cortex-m-rtic","title":"","type":null},"content":[{"type":"text","text":"cortex-m-rtic "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/embedded-dma","title":"","type":null},"content":[{"type":"text","text":"embedded-dma "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/cross","title":"","type":null},"content":[{"type":"text","text":"cross "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/knurling.ferrous-systems.com\/tools\/","title":"","type":null},"content":[{"type":"text","text":"Knurling Tools"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"測試:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/static_assertions","title":"","type":null},"content":[{"type":"text","text":"static_assertions "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/difference","title":"","type":null},"content":[{"type":"text","text":"difference "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/quickcheck","title":"","type":null},"content":[{"type":"text","text":"quickcheck "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/arbitrary","title":"","type":null},"content":[{"type":"text","text":"arbitrary "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/mockall","title":"","type":null},"content":[{"type":"text","text":"mockall "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/criterion","title":"","type":null},"content":[{"type":"text","text":"criterion "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/proptest","title":"","type":null},"content":[{"type":"text","text":"proptest"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/cargo-tarpaulin","title":"","type":null},"content":[{"type":"text","text":"tarpaulin"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/cksac\/fake-rs","title":"","type":null},"content":[{"type":"text","text":"fake-rs"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"多媒體開發: "},{"type":"link","attrs":{"href":"https:\/\/github.com\/rust-av\/rust-av","title":"","type":null},"content":[{"type":"text","text":"rust-av"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/image","title":"","type":null},"content":[{"type":"text","text":"image"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/svg","title":"","type":null},"content":[{"type":"text","text":"svg "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/CCExtractor\/rusty_ffmpeg","title":"","type":null},"content":[{"type":"text","text":"rusty_ffmpeg"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/pdeljanov\/Symphonia","title":"","type":null},"content":[{"type":"text","text":"Symphonia"}]},{"type":"text","text":"\/"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"遊戲引擎和基礎組件:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/glam","title":"","type":null},"content":[{"type":"text","text":"glam "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/sdl2","title":"","type":null},"content":[{"type":"text","text":"sdl2 "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/bevy","title":"","type":null},"content":[{"type":"text","text":"bevy "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/amethyst","title":"","type":null},"content":[{"type":"text","text":"amethyst"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/laminar","title":"","type":null},"content":[{"type":"text","text":"laminar"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/ggez","title":"","type":null},"content":[{"type":"text","text":"ggez "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tetra","title":"","type":null},"content":[{"type":"text","text":"tetra"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/hecs","title":"","type":null},"content":[{"type":"text","text":"hecs"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/simdeez","title":"","type":null},"content":[{"type":"text","text":"simdeez"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/rg3d","title":"","type":null},"content":[{"type":"text","text":"rg3d "}]},{"type":"text","text":" \/ [rapier](https:\/\/github.com\/dimforge\/ra pier) \/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/dskart\/rustcraft","title":"","type":null},"content":[{"type":"text","text":"Rustcraft"}]},{"type":"text","text":" "},{"type":"link","attrs":{"href":"https:\/\/github.com\/zer0x64\/nestadia","title":"","type":null},"content":[{"type":"text","text":"Nestadia"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/gfx-rs\/naga","title":"","type":null},"content":[{"type":"text","text":"naga"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/katharostech\/bevy_retro","title":"","type":null},"content":[{"type":"text","text":"Bevy Retro"}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/Orchaldir\/texture_generator","title":"","type":null},"content":[{"type":"text","text":"Texture Generator"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/building_blocks","title":"","type":null},"content":[{"type":"text","text":"building_blocks"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/facundoolano\/rpg-cli","title":"","type":null},"content":[{"type":"text","text":"rpg-cli "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/not-fl3\/macroquad","title":"","type":null},"content":[{"type":"text","text":"macroquad"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TUI\/GUI 開發:"},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/winit","title":"","type":null},"content":[{"type":"text","text":"winit "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/gtk","title":"","type":null},"content":[{"type":"text","text":"gtk "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/egui","title":"","type":null},"content":[{"type":"text","text":"egui "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/imgui","title":"","type":null},"content":[{"type":"text","text":"imgui "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/yew","title":"","type":null},"content":[{"type":"text","text":"yew "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/cursive","title":"","type":null},"content":[{"type":"text","text":"cursive "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/iced","title":"","type":null},"content":[{"type":"text","text":"iced "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/fontdue","title":"","type":null},"content":[{"type":"text","text":"fontdue "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/tauri","title":"","type":null},"content":[{"type":"text","text":"tauri "}]},{"type":"text","text":"\/ "},{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/druid","title":"","type":null},"content":[{"type":"text","text":"druid "}]}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Rust 行業應用盤點"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 是一門通用的高級系統級編程語言,其應用領域基本可以同時覆蓋 C\/Cpp\/Java\/Go\/Python 的應用領域。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"具體而言,Rust 的應用領域目前覆蓋到以下領域:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"下面來盤點不同領域內國內外的 Rust 項目。通過提供代碼量、團隊規模、項目週期相關數據,希望可以讓大家對 Rust 領域應用和開發效率能有一個比較直觀的認識。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"數據服務"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"數據服務領域,包括了數據庫,數據倉儲,數據流,大數據,分佈式系統等。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"TiKV(國內\/開源\/分佈式數據庫)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:數據庫\/ 分佈式系統\/ CNCF"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/tikv\/tikv","title":"","type":null},"content":[{"type":"text","text":"TiKV "}]},{"type":"text","text":"是一個開源的分佈式事務 Key-Value 數據庫,專注爲下一代數據庫提供可靠、高質量、實用的存儲架構。最初由 PingCAP 團隊在 目前,TiKV 已經在知乎、一點資訊、Shopee、美團、京東雲、轉轉等多行業頭部企業得到上線應用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TiKV 通過 Raft 一致性算法來實現數據多副本之間的一致性,本地採用了 RocksDB 存儲引擎存儲數據,同時 TiKV 支持數據自動切分和遷移。TiKV 的跨行事務最初參考 Google Percolator 事務模型,並進行了一些優化,提供快照隔離與帶鎖快照隔離,支持分佈式事務。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2018 年 8 月被 CNCF 宣佈接納爲沙箱雲原生項目,在 2019 年 5 月從沙箱晉級至孵化項目。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TiKV 項目 包含 Rust 代碼行數大約 30 萬行(包含測試代碼)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TiKV 是全球性開源項目,可以從"},{"type":"link","attrs":{"href":"https:\/\/github.com\/tikv\/tikv\/graphs\/contributors","title":"","type":null},"content":[{"type":"text","text":"貢獻者名單"}]},{"type":"text","text":"來查看團隊規模。TiKV 組織中也包含了一些 Go\/Cpp 項目,這個並不算在內,只統計參與 Rust 項目的人力規模。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:20人左右。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻: 300 多人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TiKV 是作爲 TiDB 的底層存儲跟隨 TiDB 演進。TiDB 爲 Go 開發,TiKV 爲 Rust 開發。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2016 年 1 月作爲 TiDB 的底層存儲引擎設計並開發 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2016 年 4 月開源 發佈第一版。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2017 年 10 月 16 日,TiDB 發佈 GA 版(TiDB 1.0), TiKV 發佈 1.0 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2018 年 4 月 27 日,TiDB 發佈 2.0 GA 版, TiKV 發佈 2.0 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019 年 6 月 28 日,TiDB 發佈 3.0 GA 版本, TiKV 發佈 3.0 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020 年 5 月 28 日,TiDB 發佈 4.0 GA 版本, TiKV 發佈 4.0。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021 年 4 月 07 日,TiDB 發佈 5.0 GA 版本, TiKV 發佈 5.0。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"小評"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有些朋友可能比較關注 Rust 開發效率如何,並且想對其量化,尤其是想對比 C\/ Cpp \/ Go 等其他語言的開發效率。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"私以爲量化開發效率是非常困難的,尤其是和其他語言比較的量化。我們不妨換個角度來看這件事,比如,從敏捷項目迭代管理來看這件事。如果一門語言,可以滿足日常的敏捷開發迭代需求,可以幫助完成產品的進化,那足以說明這門語言的開發效率了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"據瞭解,PingCAP 中 Go 開發人員是 Rust 開發人員的四五倍之多,當然工作量也差不多是這樣的比例。從上面的數據,我們可以看得出來, Rust 項目(TiKV)依然可以穩步跟得上 Go 項目(TiDB)的迭代節奏,說明 Rust 的開發效率還是足以勝任現代化開發需求。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"TensorBase (國內\/開源\/實時數據倉庫)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:實時數據倉庫\/ 創業\/ 天使輪"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/tensorbase\/tensorbase","title":"","type":null},"content":[{"type":"text","text":"TensorBase"}]},{"type":"text","text":" 是金明劍博士於 2020 年 8月啓動的創業項目,從一個現代的全新視角出發,用開源的文化和方式,重新構建一個Rust下的實時數據倉庫,服務於這個海量數據時代的數據存儲和分析。TensorBase 項目目前已獲得世界知名創業投資加速機構的天使輪投資。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因爲 TensorBase 是構建於 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-rs","title":"","type":null},"content":[{"type":"text","text":"Apache Arrow"}]},{"type":"text","text":" 和 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-datafusion","title":"","type":null},"content":[{"type":"text","text":"Arrow DataFusion"}]},{"type":"text","text":" 之上,所以代碼統計排除掉這兩個項目的依賴。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TensorBase 核心代碼行數 54000 多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 1人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:13 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因爲是新項目,開源社區還在建設中。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TensorBase 以時間爲節奏發版,而非語義版。 迭代週期預計 一年一個大版本,一月一個小版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從 2021年 4 月 20 正式發版,到最近 6月 16,保持這個節奏。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Timely Dataflow (國外\/開源\/實時數據流)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:Dataflow\/ 分佈式系統\/創業"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/TimelyDataflow\/timely-dataflow","title":"","type":null},"content":[{"type":"text","text":"Timely Dataflow"}]},{"type":"text","text":" 是 "},{"type":"link","attrs":{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2013\/11\/naiad_sosp2013.pdf","title":"","type":null},"content":[{"type":"text","text":"基於微軟 這篇 Timely Dataflow 論文: 《Naiad: A Timely Dataflow System》"}]},{"type":"text","text":"的 現代化 Rust 實現。是 "},{"type":"link","attrs":{"href":"http:\/\/www.clockworks.io\/","title":"","type":null},"content":[{"type":"text","text":"clockworks.io"}]},{"type":"text","text":" 公司的開源產品。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在分佈式系統中對流式數據進行復雜的處理,比如多次迭代或者遞增計算是非常困難的。Storm, Streaming Spark, MillWheel 都不能很好的適應各種應用複雜的需求。Naiad 通過引入 timestamp 的概念,給出了一個非常 low-level 的模型,可以用來描述任意複雜的流式計算。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"dataflow系統包羅萬象,MapReduce,Spark都可以算是其中代表。Timely dataflow 給出了一個完全基於時間的抽象,統一了流式計算和迭代計算。當你需要對流式數據並行處理且需要迭代控制的時候,可以使用 Timely Dataflow 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 代碼量 大約 13000 行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:4人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:30多人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2017年9月7號,0.3.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2018年6月28號,0.6.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2018年9月16號,0.7.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2018年12月3號,0.8.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年3月31號,0.9.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年7月10號,0.10.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021年3月10號,0.12.0版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基本上 三個月 出 一個 小版本,除了 Timely Dataflow 之外該團隊同時還維護一個構建於 Timely Dataflow 之上的 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/timelydataflow\/differential-dataflow\/blob\/master\/differentialdataflow.pdf","title":"","type":null},"content":[{"type":"text","text":"Differential Dataflow"}]},{"type":"text","text":" ,和 Timely Dataflow 同步迭代。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Noria (國外\/學術研究\/開源\/數據庫)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:數據庫\/ 學術論文項目"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/mit-pdos\/noria","title":"","type":null},"content":[{"type":"text","text":"Noria "}]},{"type":"text","text":" 是一種新的流式數據流系統,旨在作爲基於MIT "},{"type":"link","attrs":{"href":"https:\/\/github.com\/jonhoo","title":"","type":null},"content":[{"type":"text","text":"Jon Gjengset"}]},{"type":"text","text":" 的"},{"type":"link","attrs":{"href":"https:\/\/jon.thesquareplanet.com\/papers\/phd-thesis.pdf","title":"","type":null},"content":[{"type":"text","text":"博士學位論文"}]},{"type":"text","text":"的重型Web應用程序的快速存儲後端,也參考了OSDI'18的"},{"type":"link","attrs":{"href":"https:\/\/jon.tsp.io\/papers\/osdi18-noria.pdf","title":"","type":null},"content":[{"type":"text","text":"論文"}]},{"type":"text","text":"。 它類似於數據庫,但支持預計算和緩存關係查詢結果,以便加速查詢。 Noria 自動將緩存的結果保持爲底層數據,存儲在持久性基礎表中。 Noria使用部分狀態數據流來減少內存開銷,並支持動態,運行時數據流和查詢更改。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 代碼行數大約 59000 多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力貢獻者:2人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻者:21人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因爲是個人學術研究項目,所以發佈週期沒有那麼明顯。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目週期 2016年7月30 ~ 2020年 4月30,一共5000多commit。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Vector (國外\/開源\/數據管道)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:數據管道\/分佈式系統\/創業"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/timberio\/vector","title":"","type":null},"content":[{"type":"text","text":"Vector"}]},{"type":"text","text":" 是 Timer 公司構建的一款高性能的、端到端的(代理和聚合器)可觀察性數據管道。它是開源的,比該領域(Logstash、Fluentd之類)的所有替代方案快10倍。目前像 豆瓣、checkbox.ai、fundamentei、BlockFi、Fly.io 等公司使用了 Vector 。 "},{"type":"link","attrs":{"href":"https:\/\/vector.dev\/#performance","title":"","type":null},"content":[{"type":"text","text":"點擊此處"}]},{"type":"text","text":"查看官方性能報告,"},{"type":"link","attrs":{"href":"https:\/\/github.com\/timberio\/vector\/issues\/790","title":"","type":null},"content":[{"type":"text","text":"點擊此處"}]},{"type":"text","text":"查看目前生產環境中使用 Vector 的公司。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約 18 萬行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:9人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:140 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年3月22,初始版本發佈。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年6月10,0.2.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年7月2,0.3.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年9月25,0.4.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年10月11,0.5.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年12月13,0.6.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020年1月12,0.7.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020年2月26,0.8.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020年4月21,0.9.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020年7月23,0.10.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021年3月12,0.11.0 ~ 0.12 版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021年4月22,0.13.0版本發佈"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021年6月3,0.14.0版本發佈"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Arrow-rs (國外\/開源\/大數據標準)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: 大數據\/數據格式標準\/Apach"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-rs","title":"","type":null},"content":[{"type":"text","text":"arrow-rs"}]},{"type":"text","text":" 是 Apache Arrow 的 Rust 實現。Apache Arrow 是 一種適合異構大數據系統的內存列存數據格式標準。它有一個非常大的願景:提供內存數據分析 (in-memory analytics) 的開發平臺,讓數據在異構大數據系統間移動、處理地更快。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/arrow.apache.org\/blog\/2020\/10\/27\/rust-2.0.0-release\/","title":"","type":null},"content":[{"type":"text","text":"Arrow 從 2.0 版本開始引入 Rust"}]},{"type":"text","text":" ,從 4.0 開始 Rust 實現遷移到了獨立倉庫 arrow-rs 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Arrow的Rust實現實際上由幾個不同的項目組成,包括以下幾個獨立 crate 和 庫 :"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-rs\/blob\/master\/arrow\/README.md","title":"","type":null},"content":[{"type":"text","text":"arrow"}]},{"type":"text","text":",arrow-rs 核心庫,包含在 arrow-rs 中。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-rs\/blob\/master\/arrow-flight\/README.md","title":"","type":null},"content":[{"type":"text","text":"arrow-flight "}]},{"type":"text","text":",arrow-rs 組件之一,包含在 arrow-rs 中。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-rs\/blob\/master\/parquet\/README.md","title":"","type":null},"content":[{"type":"text","text":"parquet"}]},{"type":"text","text":",arrow-rs 組件之一,包含在 arrow-rs 中。在大數據生態內,Parquet 是最爲流行的文件存儲格式。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-datafusion","title":"","type":null},"content":[{"type":"text","text":"DataFusion"}]},{"type":"text","text":",一個可擴展的內存查詢執行引擎,使用Arrow作爲其格式。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/arrow-datafusion\/blob\/master\/ballista\/README.md","title":"","type":null},"content":[{"type":"text","text":"Ballista"}]},{"type":"text","text":",一個分佈式計算平臺,由Apache Arrow和DataFusion驅動,包含在 DataFusion 中。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"arrow-rs 各相關組件加起來,Rust 代碼量 大約 18 萬行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:大約 10 人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻: 550 多人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目 DataFusion 在 2016 年就開始構建了,後來進入了 Apache Arrow 項目。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以 arrow-rs 4.0 開始算:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021 年 4 月 18 ,版本 4.0 發佈。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021 年 5 月 18,版本 4.1 發佈。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021 年 5 月 30, 版本 4.2 發佈。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021 年 6 月11, 版本 4.3 發佈。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"InfluxDB IOx (國外\/ 開源\/時序數據庫)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:時序數據庫\/分佈式"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/influxdata\/influxdb_iox.git","title":"","type":null},"content":[{"type":"text","text":" InfluxDB IOx"}]},{"type":"text","text":",是 InfluxDB 的下一代時序引擎,使用 Rust + Aarow 來重寫。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現有設計主要有以下幾個致命性問題:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"無法解決時間線膨脹的問題"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"在雲原生環境下,對內存管理要求比較嚴格,這意味 mmap 不在適用,而且 InfluxDB 需要支持無本地盤的運行模式"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"由於索引與數據分開存儲,導致高效的數據導入導出功能難以實現"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"上述這三個問題都是現有設計的核心之處,因此要想支持現階段需求,重寫是個比較好的選擇。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"InfluxDB IOx 代碼量大約是 16萬行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 5人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻: 24 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目從 2019年 11月開始立項,但截至到今天此項目還非常早期,它還沒有準備好進行測試,也沒有任何構建或文檔。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是從 GitHub 活動狀態來看,開發狀態還非常積極。主要的開發工作都是在2021年開始的。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"CeresDB (國內\/商業\/時序數據庫)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:時序數據庫"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"CeresDB 是螞蟻集團研發的一款TP\/AP 融合時序數據庫,滿足金融時序、監控、IOT 等場景下的海量時序數據的存儲、多維查詢下鑽和實時分析需求。有開源計劃,但目前暫未開源。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前數據庫開發大約 8-10個人。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其他信息還未可知。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"tantivy (國外\/開源\/全文檢索)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:全文檢索\/ lucene"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/tantivy-search\/tantivy","title":"","type":null},"content":[{"type":"text","text":"tantivy"}]},{"type":"text","text":" 是一個由 Apache Lucene 啓發的全文搜索引擎庫,用 Rust 實現。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"tantivy 性能卓越,這裏有一個基於 Rust + Tantivy + AWS 構建的應用 :"},{"type":"link","attrs":{"href":"https:\/\/common-crawl.quickwit.io\/","title":"","type":null},"content":[{"type":"text","text":"提供十億網頁搜索並生成常見單詞雲"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 50000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1 人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:85人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目自 2016 年立項,迭代週期爲平均一月一個小版本發佈,目前發佈到 0.15.2 版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Rucene (國內\/開源\/搜索引擎)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:知乎\/ lucene"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/zhihu\/rucene","title":"","type":null},"content":[{"type":"text","text":"Rucene"}]},{"type":"text","text":" 是知乎團隊開源的一款基於 Rust 實現的搜索引擎。Rucene不是完整的應用程序,而是可以輕鬆用於將完整文本搜索功能添加到應用程序的代碼庫和API。它是對 Apache Lucene 6.2.1 項目的 Rust 移植。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 10 萬 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 4人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻: 0 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"可能因爲是公司內部項目開源化,目前沒有迭代出具體語義版本。在知乎內是用於生產環境的。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"其他一些項目"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/netwarps\/libp2p-rs","title":"","type":null},"content":[{"type":"text","text":"libp2p-rs"}]},{"type":"text","text":",是一個模塊化和可拓展的網絡堆棧,專注於傳輸協議無關,模塊化和可移植編碼,最終實現無論設備所處的環境、運行的協議如何,libp2p 都能讓設備的互聯成爲現實。由國內Netwarps 團隊開發,該團隊是一個致力於實現去中心化網絡和存儲技術的創業團隊,目標在於使用去中心化技術支撐各類 IOT 應用,以及保障"},{"type":"link","attrs":{"href":"https:\/\/cloud.tencent.com\/solution\/data_protection?from=10680","title":"","type":null},"content":[{"type":"text","text":"數據安全"}]},{"type":"text","text":"。基於此目標,Netwarps 開發了去中心化"},{"type":"link","attrs":{"href":"https:\/\/cloud.tencent.com\/product\/cfs?from=10680","title":"","type":null},"content":[{"type":"text","text":"文件存儲"}]},{"type":"text","text":"系統(DFS)和去中心化計算平臺(DCP)。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"雲原生"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雲原生領域包括:機密計算、Serverless、分佈式計算平臺、容器、WebAssembly、運維工具等"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"StratoVirt"},{"type":"text","text":" (國內\/開源\/容器)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:容器\/ 虛擬化\/ Serverless"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/gitee.com\/openeuler\/stratovirt","title":"","type":null},"content":[{"type":"text","text":"StratoVirt"}]},{"type":"text","text":" 是 "},{"type":"text","marks":[{"type":"strong"}],"text":"華爲 OpenEuler 團隊"},{"type":"text","text":"研發的 基於Rust的下一代虛擬化平臺。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Strato,取自stratosphere,意指地球大氣層中的平流層,大氣層可以保護地球不受外界環境侵害,而平流層則是大氣層中最穩定的一層;類似的,虛擬化技術是操作系統平臺之上的隔離層,既能保護操作系統平臺不受上層惡意應用的破壞,又能爲正常應用提供穩定可靠的運行環境;以Strato入名,寓意爲保護openEuler平臺上業務平穩運行的輕薄保護層。同時,Strato也承載了項目的願景與未來: 輕量、靈活、 安全和完整的保護能力。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"StratoVirt是計算產業中面向雲數據中心的企業級虛擬化平臺,實現了一套架構統一支持虛擬機、容器、Serverless三種場景,在輕量低噪、軟硬協同、安全等方面具備關鍵技術競爭優勢。StratoVirt在架構設計和接口上預留了組件化拼裝的能力和接口,StratoVirt可以按需靈活組裝高級特性直至演化到支持標準虛擬化,在特性需求、應用場景和輕快靈巧之間找到最佳的平衡點。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約是 27000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:4 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:15人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020-09-23,發佈 0.1.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021-03-25,發佈 0.2.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021-05-28 ,發佈 0.3.0 版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Firecracker (國外\/產品)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: 容器\/ Serverless\/ FaaS"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/firecracker-microvm\/firecracker","title":"","type":null},"content":[{"type":"text","text":"Firecracker"}]},{"type":"text","text":" 由 AWS 發佈並將firecracker開源, 它的定位是面向Serverless計算業務場景。 Firecracker本質上是基於KVM的輕量級的microVM, 可以同時支持多租戶容器和FaaS場景。 Security和Fast是firecracker的首要設計目標。 它的設計理念可以概括爲:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基於KVM"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"精簡的設備集(極簡主義)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基於Rust語言(Builtin Safety)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"定製的guest kernel(快速啓動)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"優化內存開銷(使用musl c)"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Firecracker使用了極爲精簡的設備模型(僅有幾個關鍵的模擬設備),目的是減少攻擊面已提升安全性。 同時這irecracker使用了一個精簡的內核(基於Apline Linux),這使得Firecracker可以做在125ms內拉起一個虛擬機。 Firecracker使用musl libc而不是gnu libc,能夠將虛擬機的最低內存開銷小到5MB。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 75000 多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:7人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:140 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從 2018年 3月5號 發佈 0.1.0 開始,基本上是每個月發一個小版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"截止到上個月,剛發佈了 0.24.0 版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Krustlet (國外\/產品)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: Kubernetes\/ WebAssembly\/ 容器"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"微軟 "},{"type":"link","attrs":{"href":"https:\/\/deislabs.io\/posts\/hello-world\/","title":"","type":null},"content":[{"type":"text","text":"Deis Labs"}]},{"type":"text","text":"發佈了"},{"type":"link","attrs":{"href":"https:\/\/deislabs.io\/posts\/introducing-krustlet\/","title":"","type":null},"content":[{"type":"text","text":"Krustlet"}]},{"type":"text","text":",它是使用 Rust 實現的一種 Kubernetes kubelet。它監聽 Kubernetes API,以獲取新的 Pod 請求(在集羣中運行基於 WASI 的應用程序),只要請求事件與節點選擇器是匹配的。因此,要在 Krustlet 節點上運行應用程序,用戶可以使用 taints、tolerations 和節點選擇器。此外,用戶必須爲應用程序生成 WebAssembly 二進制文件。如果應用程序是用 C 語言開發的,就用"},{"type":"link","attrs":{"href":"https:\/\/00f.net\/2019\/04\/07\/compiling-to-webassembly-with-llvm-and-clang\/","title":"","type":null},"content":[{"type":"text","text":"clang"}]},{"type":"text","text":",如果應用程序是用 Rust 開發的,就用"},{"type":"link","attrs":{"href":"https:\/\/developer.mozilla.org\/en-US\/docs\/WebAssembly\/Rust_to_wasm","title":"","type":null},"content":[{"type":"text","text":"cargo"}]},{"type":"text","text":"。然後,用戶必須使用"},{"type":"link","attrs":{"href":"https:\/\/github.com\/engineerd\/wasm-to-oci","title":"","type":null},"content":[{"type":"text","text":"wasm-to-oci"}]},{"type":"text","text":"打包,並將容器鏡像推送到容器註冊中心。要部署應用程序,用戶需要定義一個 Kubernetes 清單,其中包含 tolerations。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前該項目還未到 1.0,有很多實驗性特性,但是它的存在證明了 WebAssembly 在容器方面的應用方向。但現在 微軟加入了 字節碼聯盟 ,該項目也會連同字節碼聯盟的其他成員,一起發展 WebAssembly,特別是即將到來的WASI規範工作和模塊鏈接。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 21000 多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 7人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻: 32人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自從 2020 年 4月7日,0.1.0 發佈以來,大約每一兩個月發佈一次新版本,目前發佈到 0.7.0 版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊有計劃在未來幾個月內達到 1.0 版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"linkerd2-proxy (國外\/產品)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: 服務網格\/ k8s"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Linkerd 算是 服務網格的鼻祖,但是由於 Linkerd-proxy 運行需要 Java 虛擬機的支持,在啓動時間、預熱、內存消耗等方面,相比起晚它半年發佈的挑戰者 Envoy 均處於全面劣勢。後來才重寫了 Linkerd2 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Linkerd2 (曾命名爲 "},{"type":"link","attrs":{"href":"https:\/\/conduit.io\/","title":"","type":null},"content":[{"type":"text","text":"Conduit"}]},{"type":"text","text":") 是 Buoyant 公司推出的下一代輕量級服務網格框架。與 linkerd 不同的是,它專用於 Kubernetes 集羣中,並且比 linkerd 更輕量級(基於 Rust 和 Go,沒有了 JVM 等大內存的開銷),可以以 sidecar 的方式把代理服務跟實際服務的 Pod 運行在一起(這點跟 Istio 類似)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/linkerd\/linkerd2-proxy","title":"","type":null},"content":[{"type":"text","text":"linkerd2-proxy "}]},{"type":"text","text":" 是 Linkerd2 中的底層代理。代理可以說是服務網格中最關鍵的組件。它可以隨應用程序的部署而擴展,因此低附加延遲和低資源消耗至關重要。它也是處理應用程序所有敏感數據的地方,因此安全性至關重要。如果代理速度慢、臃腫或不安全,那麼服務網格也是如此。使用 Rust 重寫後,"},{"type":"link","attrs":{"href":"https:\/\/github.com\/linkerd\/linkerd2-proxy","title":"","type":null},"content":[{"type":"text","text":"Linkerd2-proxy"}]},{"type":"text","text":"的性能與資源消耗方面都已不輸 Envoy。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust是Linkerd2-proxy的唯一選擇。它提供了閃電般的性能、可預見的低延遲和我們知道服務網格代理需要的安全屬性。它還提供了現代語言特性,如模式匹配和富有表現力的靜態類型系統,以及工具,如內置的測試框架和包管理器,使在其中編程變得非常愉快。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Linkerd2-proxy 構建在 Rust 異步生態之上,使用了"},{"type":"link","attrs":{"href":"https:\/\/github.com\/tokio-rs\/tokio","title":"","type":null},"content":[{"type":"text","text":"Tokio"}]},{"type":"text","text":", "},{"type":"link","attrs":{"href":"https:\/\/github.com\/hyperium\/hyper","title":"","type":null},"content":[{"type":"text","text":"Hyper"}]},{"type":"text","text":", and "},{"type":"link","attrs":{"href":"https:\/\/github.com\/tower-rs","title":"","type":null},"content":[{"type":"text","text":"Tower"}]},{"type":"text","text":" 等框架和庫。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 43000 多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:3 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:37 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前該項目已經是 V2.148.0 版本。發佈週期大約是每週一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Lucet (國外\/產品)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: Faas\/ Serverless\/ WebAssembly \/ Compiler"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/bytecodealliance\/lucet","title":"","type":null},"content":[{"type":"text","text":"Lucet"}]},{"type":"text","text":" 是一個本機 Webassembly 編譯器和運行時。 它旨在安全地在您的應用程序內執行不受信任的 WebasseMbly 程序。由 Fastly 公司開發,屬於 字節碼聯盟 的子項目。Fastly 於 2020 年從 Mozilla 招募了 WebAssembly Server side 團隊,目前 lucet 團隊已經和 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/bytecodealliance\/wasmtime","title":"","type":null},"content":[{"type":"text","text":"wasmtime"}]},{"type":"text","text":" 團隊合併。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Fastly 龐大的 CDN 業務催生了它們進軍邊緣計算的想法,並逐漸成爲其中最具競爭力和投入度最高的頭部公司。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關於邊緣計算,另外一家頭部公司是Cloudflare(NET.US)。從技術角度看,Fastly和Cloudflare在其無服務器邊緣計算解決方案中採用了兩種不同的方法。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Cloudflare選擇在Chromium V8引擎上構建其解決方案。這使得他們可以利用Google(GOOG.US) Chrome團隊已經完成的工作,在2018年便將邊緣計算產品快速推向市場。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這是對當時由雲供應商(如Amazon(AMZN.US) Lambda)提供的無服務器解決方案的重大改進。Cloudflare的工作者將冷啓動時間減少了100倍,進入到毫秒階段。並將內存使用量減少了10倍,從而可以更有效地利用硬件資源。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但Fastly決定不依賴現有技術來進行無服務器計算,例如可重複使用的容器或V8引擎,而是決定全心投入WebAssembly,並構建了自己的Lucet編譯器和運行時,對性能、安全性和緊湊性進行了優化。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自2017年以來,Fastly一直在幕後進行這項工作,它爲Compute@Edge產品線提供了堅實的基礎,該平臺現在爲多個客戶運行生產代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Lucet將WebAssembly編譯爲快速、有效的二進制文件以便執行,還可以通過內存分配來增強安全性,並且不會從先前的請求中產生任何殘留。Lucet還包括一個經過嚴格優化的簡化運行時環境,Fastly團隊在該環境上花費了大部分開發時間。結果獲得了比V8引擎更好的性能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Fastly冷啓動時間完全進入微秒級別--官方宣稱爲35微秒。這至少比V8引擎快100倍,後者需要3-5毫秒才能啓動(3,000到5,000微秒)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"同樣,由於Lucet僅包含運行已編譯的彙編代碼所需的代碼模塊,因此它只需要幾千字節的內存。這大約是V8引擎使用的3MB的千分之一。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"lucet 代碼量爲 29000 多行, wasmtime 總代碼量爲 27萬多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發 : 16 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:200 多人 (wasmtime 貢獻者居多)"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"lucet 目前進入維護期,wasmtime在高速重構。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"評價迭代週期爲 每個月發一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"wasmcloud (國外\/開源\/產品)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: WebAssembly\/ 分佈式計算"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/wasmCloud\/wasmCloud","title":"","type":null},"content":[{"type":"text","text":"WasmCloud"}]},{"type":"text","text":" 運行時可以用於雲、瀏覽器和嵌入式等場景。wasmcloud 是一個基於 WebAssembly 的分佈式計算平臺。比較有創新的地方在於,它制定了一個 waPC 標準,用於 Guest 和 Host 的安全過程調用,來解決當前 WASI 等特性不完善的問題。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 11000 多行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:2 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:11 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目從 2021 年 2月17 啓動,迭代週期大約是每兩週一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Habitat (國外\/開源\/運維工具)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:Chef\/ DevOps\/ 運維工具"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/habitat-sh\/habitat","title":"","type":null},"content":[{"type":"text","text":"Habitat"}]},{"type":"text","text":" 讓應用團隊能夠在任何環境中構建、部署、管理任何應用 ,不管是傳統的數據中心,還是容器化的微服務。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“Lift & Shift” 遺留應用到現代平臺 。把已有的、對商業至關重要的應用遷移到現代平臺上對許多機構來說 是一個痛點。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過雲原生(雲、容器)的策略來交付 應用 。許多機構在移居和部署雲原生平臺的 過程中備受阻礙。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"特點:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"Habitat 把管理界面和應用構建在一起,使得自 動化更加簡便。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"Habitat Operator:讓你的所有應用僅需一個 Kubernetes Operator,不需 要每個應用都有特製的 Operator。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"不管你的應用在不在 Kubernetes 上,Habitat 的 Open Service Broker 都能通過 Kubernetes 的原生界面讓它們共存。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 74000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:5 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:140人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"迭代週期爲每週一個小版本,目前版本爲 1.6.342。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"其他一些項目"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/datenlord\/datenlord","title":"","type":null},"content":[{"type":"text","text":"DatenLord"}]},{"type":"text","text":" 是用 Rust 實現的新一代開源分佈式存儲,面向雲原生場景提供高性能存儲解決方案。爲了提高 IO 性能,DatenLord 採用繞過內核 (bypass Kernel) 的方式,主要在用戶態實現 IO 功能,避免內核執行 IO 任務帶來的額外開銷,從而實現高性能分佈式存儲。Datenlord 是國內創業團隊,"},{"type":"link","attrs":{"href":"https:\/\/datenlord.github.io\/","title":"","type":null},"content":[{"type":"text","text":"點此"}]},{"type":"text","text":"查看更多信息。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/datafuselabs\/datafuse","title":"","type":null},"content":[{"type":"text","text":"Datafuse"}]},{"type":"text","text":",是一種實時數據處理和分析DBMS,基於 Apache Arrow-rs開發,受 ClickHouse 啓發。該項目屬於 Datafuse labs,是由中國開發者領頭的項目,但不清楚公司是在國內還是國外。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"操作系統"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"操作系統領域包括使用 Rust 實現的各種操作系統。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Rust for Linux (國外\/ Rust 進入 Linux 支持項目 )"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: Linux"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/Rust-for-Linux\/linux","title":"","type":null},"content":[{"type":"text","text":"Rust for Linux"}]},{"type":"text","text":" 項目旨在推動 Rust 成爲 Linux 內核第二編程語言。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Linux內核是現代互聯網的核心,從服務器到客戶端設備。它處於處理網絡數據和其他形式的輸入的第一線。因此,Linux內核中的漏洞會產生廣泛的影響,使人們、組織和設備的安全和隱私面臨風險。由於它主要是用C語言編寫的,而C語言不是內存安全的,所以內存安全漏洞,如緩衝區溢出和使用後賦值,是一個持續的問題。通過使Linux內核的部分內容用Rust語言編寫成爲可能,這是內存安全的,我們可以完全消除某些組件的內存安全漏洞,比如驅動程序。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當前進展:Google 贊助 且 由 ISRG 組織僱傭 Miguel Ojeda (核心開發),讓他全職從事Rust for Linux和其他安全工作,爲期一年。希望能通過讓他全職從事這項工作,爲支持數字基礎設施盡一份力。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"核心開發: 1 ~ 6人。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"暫未有其他信息。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Coreutils"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: GNU\/ Shell\/ Rust for Linux"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/uutils\/coreutils","title":"","type":null},"content":[{"type":"text","text":"Coreutils"}]},{"type":"text","text":" 是GNU Shell 的核心實用程序的 Rust 實現。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 77000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:8人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:250人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目於2020年底啓動,迭代週期平均一月一個小版本,目前 0.0.6 版本。目前狀態,足以通過 GNOME 啓動 Debian 系統。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Occulum (國內\/開源\/TEE 庫操作系統)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: 機密計算\/ 可信計算\/ TEE \/ 庫操作系統"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/occlum\/occlum","title":"","type":null},"content":[{"type":"text","text":"Occulum"}]},{"type":"text","text":" 是螞蟻開源的 TEE 操作系統,也是 CCC 機密計算聯盟中第一個由中國公司發起的開源項目。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Occlum 提供 POSIX 編程接口,支持多種主流語言(C\/C++, Java, Python, Go, Rust 等),支持多種安全文件系統。可以說,Occlum 提供了一個兼容 Linux 的 Enclave 運行環境,使得機密計算可以輕鬆支持已有的應用,也使得機密應用開發者複用原有開發技能。Occlum 不但在工業界場景中得到了廣泛的應用,而且也在系統頂會 ASPLOS 2020 發表了學術論文,代表了機密計算業界的領先水平。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從架構上來看,Occlum 不但提供基本的類似 Linux 的操作系統能力,而且提供一個類似 Docker 的用戶使用接口,比如這裏的 Occlum build 和 Occlum run 等都跟 docker 的命令類似。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼與團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Occulum 代碼量大約 28000 多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 5人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:22 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"迭代週期是每六週發一個新版。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"rCore 和 zCore (國內\/ 教育\/ 學術\/ 開源\/ 操作系統)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: 清華大學\/ rCore\/ zCore\/ 操作系統\/ 教學"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rcore-os\/rCore","title":"","type":null},"content":[{"type":"text","text":"rCore"}]},{"type":"text","text":" 是用 Rust 重新實現的 Linux 內核,誕生於 2018 年,目前已在清華計算機系的操作系統教學實驗中試點應用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rcore-os\/zCore","title":"","type":null},"content":[{"type":"text","text":"zCore"}]},{"type":"text","text":" 是用 Rust 語言重新實現的 Zircon (Google Fuchsia OS 的微內核)微內核。它運行在內核態,對外提供與 Zircon 完全相同的系統調用,因此"},{"type":"text","marks":[{"type":"strong"}],"text":"能夠運行原生的 Fuchsia 用戶程序"},{"type":"text","text":"。不僅如此,它還可以"},{"type":"text","marks":[{"type":"strong"}],"text":"作爲一個普通的用戶進程運行在 Linux 或 macOS 的用戶態"},{"type":"text","text":",我們一般把這種模式稱爲 LibOS 或 User-Mode OS。你甚至無需安裝 QEMU 模擬器,只需裝上 Rust 官方工具鏈,就可以編譯運行體驗 zCore!"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一些相關學習資源:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/zhuanlan.zhihu.com\/p\/137733625","title":"","type":null},"content":[{"type":"text","text":"下一代 Rust OS:zCore 正式發佈"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/rustmagazine.github.io\/rust_magazine_2021\/chapter_1\/rcore_intro.html#%E7%94%A8rust%E5%86%99%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F--%E6%B8%85%E5%8D%8E-rcore-os-%E6%95%99%E7%A8%8B%E4%BB%8B%E7%BB%8D","title":"","type":null},"content":[{"type":"text","text":"用"},{"type":"codeinline","content":[{"type":"text","text":"Rust"}]},{"type":"text","text":"寫操作系統 | 清華 rCore OS 教程介紹"}]}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"rCore 代碼量大約爲 26000 行 Rust 代碼,zCore 代碼量大約爲 27000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:3~5人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:30 人左右"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"兩個項目都已進入維護期,沒有對外發布版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Redox (國外\/ 開源\/ 操作系統)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:操作系統"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Redox"},{"type":"text","text":"是一個用"},{"type":"link","attrs":{"href":"https:\/\/www.rust-lang.org\/","title":"","type":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Rust"}]},{"type":"text","text":"語言編寫的類UNIX操作系統 , 它的目標是把Rust語言的創新帶入到一個現代的微內核和全系列的應用程序。Redox 幕後公司應該是 System 76 公司。主要項目放在 GitLab 中。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊開發"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量目前大約爲 "},{"type":"text","marks":[{"type":"strong"}],"text":"134 萬行 Rust 代碼"},{"type":"text","text":",算得上是 Rust 生態中重量級項目了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 21人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:79 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Redox 從 2016 年開始立項,直到 2017 年 0.3 版本開始,每年發佈一個小版本,到今年已經發布到 0.5 版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"tockOS (國外\/開源\/嵌入式實時操作系統)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:嵌入式操作系統\/實時"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/tock\/tock","title":"","type":null},"content":[{"type":"text","text":"Tock"}]},{"type":"text","text":" 是一個嵌入式操作系統,設計用於在基於Cortex-M和RISC-V的嵌入式平臺上運行多個併發的、互不信任的應用程序。Tock的設計以保護爲中心,既可以防止潛在的惡意應用程序,也可以防止設備驅動程序。Tock使用兩種機制來保護操作系統的不同組件。首先,內核和設備驅動程序是用Rust編寫的,Rust是一種提供compile-time內存安全、類型安全和嚴格別名的系統編程語言。Tock使用Rust來保護內核(例如調度程序和硬件抽象層)不受特定於平臺的設備驅動程序的影響,並將設備驅動程序彼此隔離。其次,Tock使用內存保護單元將應用程序彼此和內核隔離開來。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Google發佈的這個 OpenSK 是跑在 Tock上面的!"},{"type":"link","attrs":{"href":"https:\/\/github.com\/google\/OpenSK","title":"","type":null},"content":[{"type":"text","text":"OpenSK "}]},{"type":"text","text":"是用Rust編寫的安全密鑰的開源實現,該密鑰同時支持FIDO U2F和FIDO2標準。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 15萬 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:4 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:123 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目目前已進入維護期。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前 1.6 版本發佈,以往迭代週期大概是每半年發佈一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Theseus (國外\/開源\/高端嵌入式操作系統\/研究項目)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: 嵌入式操作系統\/研究型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/theseus-os\/Theseus","title":"","type":null},"content":[{"type":"text","text":"Theseus"}]},{"type":"text","text":" 是美國萊斯大學多年實驗的結果,也有其他大學參與,比如耶魯大學。它通過減少一個組件對另一個組件持有的狀態來重新設計和改進操作系統的模塊化,並利用一種安全的編程語言 Rust,將盡可能多的操作系統責任轉移給編譯器。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Theseus 體現了兩個主要貢獻。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一個操作系統結構。其中許多微小的組件具有明確定義的、運行時持久的界限,它們之間的互動不需要彼此持有狀態。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一種使用語言級機制實現操作系統本身的內部語言方法。這樣編譯器就可以執行關於操作系統語義的不變性。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Theseus 的結構、內部語言設計和狀態管理以超越現有作品的方式實現了核心操作系統組件的實時演進和故障恢復。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"更多資料:"},{"type":"link","attrs":{"href":"https:\/\/www.usenix.org\/conference\/osdi20\/presentation\/boos","title":"","type":null},"content":[{"type":"text","text":"《Theseus: an Experiment in Operating System Structure and State Management》"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 56000 行代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:17人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目自 2017 年 3月啓動,目前已經進入維護期。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"工具軟件"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"工具軟件包括使用 Rust 實現的一些 命令行工具、桌面軟件等。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"RustDesk (國內\/部分開源\/遠程桌面軟件)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rustdesk\/rustdesk","title":"","type":null},"content":[{"type":"text","text":"rustdesk"}]},{"type":"text","text":",是一款遠程桌面軟件,開箱即用,無需任何配置,替代TeamViewer和AnyDesk。您完全掌控數據,不用擔心安全問題。rustdesk 是一款商業開源軟件,開源度 90%。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 35000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 1人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻: 8 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021 年 3 月 27 發佈 1.1 版本,之前的版本迭代無從知曉。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自此之後基本每月迭代一兩個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"spotify-tui (國外\/終端音樂軟件)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:Terminal UI\/ Spotify"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/Rigellute\/spotify-tui.git","title":"","type":null},"content":[{"type":"text","text":"spotify-tui"}]},{"type":"text","text":" 是一款終端 Spotify 音樂客戶端,基於 Rust 終端 UI 開發框架 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/fdehau\/tui-rs","title":"","type":null},"content":[{"type":"text","text":"Tui-rs"}]},{"type":"text","text":" 開發。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 12000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:84 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"開發週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"已經進入維護期,平均每月一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Ripgrep (國外\/終端文本搜索)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:文本處理\/ 終端工具"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/BurntSushi\/ripgrep","title":"","type":null},"content":[{"type":"text","text":"ripgrep"}]},{"type":"text","text":" 是一個以行爲單位的搜索工具, 它根據提供的 pattern 遞歸地在指定的目錄裏搜索。它是由 Rust 語言寫成,相較與同類工具,它的特點就是無與倫比地快。ripgrep 目前已經成爲 Linux 下最快的文本搜索工具。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約 35000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:287 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目於 2016 年開始啓動,在 2018年之前迭代比較頻繁,後面進入穩定維護期,基本一年一個大版本,目前版本爲 13.0.0 。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"nushell (國外\/開源\/shell工具)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:shell"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/nushell\/nushell","title":"","type":null},"content":[{"type":"text","text":"NuShell "}]},{"type":"text","text":" 是使用 Rust 語言編寫的跨 Unix, Windows, macOS 系統的現代 Shell 程序。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"NuShell 不像傳統的 Unix Shell,它從 PowerShell 汲取靈感,將每個命令產生的結果視作具有結構的對象,而不是傳統的原始字節。但和 PowerShell 相比,它的速度要快得多。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"NuShell 的特色在於結構化數據以及類似 SQL 的二維表操作, 在處理大量結構化數據時具有一定優勢,幾乎相當於一個針對本地文件、數據的 SQL 解析器。不過其缺少流程控制語句的特點,讓它難以勝任邏輯化的系統管理工作。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 10萬行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 2人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:231 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目於 2019年 5月啓動,迭代週期爲每個月一個小版本,目前爲 0.32.0 版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"alacritty (國外\/開源\/模擬終端)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:模擬終端\/OpenGL"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/alacritty\/alacritty","title":"","type":null},"content":[{"type":"text","text":"Alacritty "}]},{"type":"text","text":"是一個免費的開源,快速,跨平臺的終端仿真器,它使用"},{"type":"text","marks":[{"type":"strong"}],"text":"GPU"},{"type":"text","text":" ( "},{"type":"text","marks":[{"type":"strong"}],"text":"圖形處理單元"},{"type":"text","text":" )進行渲染,實現"},{"type":"link","attrs":{"href":"https:\/\/www.howtoing.com\/linux-terminal-emulators\/","title":"","type":null},"content":[{"type":"text","text":"了Linux"}]},{"type":"text","text":"中許多其他"},{"type":"link","attrs":{"href":"https:\/\/www.howtoing.com\/linux-terminal-emulators\/","title":"","type":null},"content":[{"type":"text","text":"終端仿真器"}]},{"type":"text","text":"所不具備的某些優化。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Alacritty"},{"type":"text","text":"專注於"},{"type":"text","marks":[{"type":"strong"}],"text":"簡單"},{"type":"text","text":"和"},{"type":"text","marks":[{"type":"strong"}],"text":"性能"},{"type":"text","text":"兩個目標。 "},{"type":"text","marks":[{"type":"strong"}],"text":"性能"},{"type":"text","text":"目標意味着,它應該比任何其他可用的終端仿真器快。 "},{"type":"text","marks":[{"type":"strong"}],"text":"簡單性"},{"type":"text","text":"目標意味着,它不支持Linux中的"},{"type":"text","marks":[{"type":"strong"}],"text":"選項卡"},{"type":"text","text":"或"},{"type":"text","marks":[{"type":"strong"}],"text":"分割"},{"type":"text","text":" (可以由其他"},{"type":"link","attrs":{"href":"https:\/\/www.howtoing.com\/tmux-to-access-multiple-linux-terminals-inside-a-single-console\/","title":"","type":null},"content":[{"type":"text","text":"終端多路複用器 - tmux"}]},{"type":"text","text":"輕鬆提供)等功能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"性能上已經秒殺Linux 上同類工具了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 22000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發: 2人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:330人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目啓動於 2016 年,目前迭代週期平均每三個月發佈一個新的小版本。目前版本號 0.8.0。雖然還未穩定1.0版本,但已經成爲很多人日常開發工具了。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Gitui (國外\/開源\/Git終端UI)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:Git\/ Terminal UI"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/extrawurst\/gitui","title":"","type":null},"content":[{"type":"text","text":"Gitui"}]},{"type":"text","text":" 是一個速度很快的 Git 終端界面。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 29000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:42 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目於 2020 年3 月 15日啓動,迭代週期平均爲每兩週一個小版本發佈。目前 0.16.1 版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"其他優秀的終端工具"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/ogham\/exa","title":"","type":null},"content":[{"type":"text","text":"exa"}]},{"type":"text","text":",Rust 重寫 ls 工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/crates.io\/crates\/bottom","title":"","type":null},"content":[{"type":"text","text":"bottom"}]},{"type":"text","text":",Rust 重寫 Top 工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/starship.rs\/","title":"","type":null},"content":[{"type":"text","text":"starship"}]},{"type":"text","text":" 超級快、支持各種訂製的極簡命令行提示符,支持任意 shell"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/sharkdp\/bat","title":"","type":null},"content":[{"type":"text","text":"bat"}]},{"type":"text","text":" 支持更多特性的 "},{"type":"codeinline","content":[{"type":"text","text":"cat"}]},{"type":"text","text":" 克隆"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/dandavison\/delta","title":"","type":null},"content":[{"type":"text","text":"delta"}]},{"type":"text","text":" git、diff 輸出查看器"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/ajeetdsouza\/zoxide","title":"","type":null},"content":[{"type":"text","text":"zoxide"}]},{"type":"text","text":" 更快捷地瀏覽文件系統"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/sharkdp\/fd","title":"","type":null},"content":[{"type":"text","text":"fd"}]},{"type":"text","text":"簡單、快速、用戶友好的 "},{"type":"codeinline","content":[{"type":"text","text":"find"}]},{"type":"text","text":" 替代品"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/dbrgn\/tealdeer","title":"","type":null},"content":[{"type":"text","text":"tealdeer"}]},{"type":"text","text":" 衆人一起編寫的終端命令速查卡"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"機器學習"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"機器學習領域包括,基於 Rust 實現的機器學習框架、科學計算庫等等。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"linfa (國外\/開源\/機器學習工具包)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:scikit-learn\/ sklearn\/ 基礎工具包"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/rust-ml.github.io\/linfa\/","title":"","type":null},"content":[{"type":"text","text":"Linfa"}]},{"type":"text","text":" 是一個 Rust 實現的 類似於 python scikit-learn 的庫,旨在提供一個全面的工具包,可以使用 Rust 構建機器學習應用程序。該團隊還創建了 Rust-ML 組織。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"scikit-learn,又寫作sklearn,是一個開源的基於python語言的機器學習工具包。 它通過NumPy, SciPy和Matplotlib等python數值計算的庫實現高效的算法應用,並且涵蓋了幾乎所有主流機器學習算法。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"更多資料:"},{"type":"link","attrs":{"href":"https:\/\/rust-ml.github.io\/book\/","title":"","type":null},"content":[{"type":"text","text":"Rust 機器學習之書"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 23000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:6人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:12人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目 2018年就立項了,但是正式動工是 2020年10月,2021年進入迭代期。基本每月一個小版本,最近的版本在4月份發佈的,0.4.0版本。項目開發狀態還是比較活躍的。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"tokenizers (國外\/開源\/自然語言處理分詞庫)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:自然語言處理\/ 分詞庫"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/huggingface\/tokenizers","title":"","type":null},"content":[{"type":"text","text":"tokenizers"}]},{"type":"text","text":" 是 Hugging Face 公司開源的一款 Rust 實現的分詞庫。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Hugging Face 是一家總部位於美國紐約的聊天機器人初創服務商。該公司在 NLP界鼎鼎大名,三月份剛剛完成4000萬美元B輪融資。在GitHub上發佈了開源 NLP 庫 Transformers。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基於深度學習的現代 NLP 管道中的瓶頸之一就是tokenization,尤其是通用性強且獨立於框架的實現。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所以,該分詞器的核心是用Rust編寫的,並且存在Node和Python的綁定。提供當今最常用的分詞器的實現,重點是性能和通用性。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"特點:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用當今最常用的分詞器(tokenize),訓練新的詞彙並進行標記。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"由於採用Rust實現,速度極快(包括訓練和標記化)。在服務器的CPU上對一GB的文本進行標記化只需不到20秒。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"易於使用,但也非常通用。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲研究和生產而設計。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"正則化帶有對齊性跟蹤。總是可以得到與給定標記相對應的原始句子的部分。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"做所有的預處理。截斷、填充、添加你的模型需要的特殊標記。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約 28000 行 Rust 代碼。佔總項目的 68%,該項目還有部分 Python 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目自 2019 年10月開始啓動,迭代週期平均爲每月一個小版本,目前版本爲 "},{"type":"codeinline","content":[{"type":"text","text":"Python V0.10.3"}]},{"type":"text","text":"。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"tch-rs (國外\/開源\/PyTorch 綁定)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:PyTorch\/ cpp api 綁定"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/LaurentMazare\/tch-rs","title":"","type":null},"content":[{"type":"text","text":"tch-rs"}]},{"type":"text","text":"是Pytorch的Cpp API的 Rust 綁定。 Tch Crate的目標是圍繞 Cpp Pytorch API 提供一些薄的包裝器。 它旨在儘可能接近原始的Cpp API。 然後可以在此之上開發更加慣用的 Rust 綁定。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 58000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1 人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:36 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目從 2019 年 2月啓動,截止到今天,還沒有正式發佈任何版本。目前還在活躍維護中,但可能是 個人項目。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"ndarray (國外\/開源\/科學計算)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:科學計算\/ N 維數組"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rust-ndarray\/ndarray","title":"","type":null},"content":[{"type":"text","text":"ndarray"}]},{"type":"text","text":" 是一個由Rust官方團隊中資深科學計算專家bluss開發的開源項目,實現了基於rust的矩陣和線性運算。目標是在Rust中建立類似於numpy和openblas的科學計算社區。它是機器視覺、數據挖掘、生物信息等多類科學計算庫的基礎,社區中的主要用戶爲一些相關技術的高校或者研究所。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前 華爲 也在深度參與該基礎庫的研發,參見 "},{"type":"link","attrs":{"href":"https:\/\/rustmagazine.github.io\/rust_magazine_2021\/chapter_3\/hw_ndarray.html","title":"","type":null},"content":[{"type":"text","text":"華爲 | Rust 科學計算多維數組運算庫的分析與實踐"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"另外還有線性代數相關庫:"},{"type":"link","attrs":{"href":"https:\/\/github.com\/rust-ndarray\/ndarray-linalg","title":"","type":null},"content":[{"type":"text","text":"ndarray-linalg"}]},{"type":"text","text":" 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 29000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:57 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項目自 2015 年11 月啓動,平均每半年 1 ~ 2 個小版本發佈。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"TVM-rs (國外\/開源\/ TVM rust 綁定)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:Apache\/ TVM"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/apache\/tvm\/tree\/main\/rust","title":"","type":null},"content":[{"type":"text","text":"tvm-rs"}]},{"type":"text","text":" 是 TVM 的 Rust 綁定。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"TVM 是由華盛頓大學在讀博士陳天奇等人提出的深度學習自動代碼生成方法,去年 8 月"},{"type":"link","attrs":{"href":"http:\/\/mp.weixin.qq.com\/s?__biz=MzA3MzI4MjgzMw==&mid=2650729915&idx=1&sn=2c75c059166a9f00942d9cc3326afb65&chksm=871b29c5b06ca0d3e16dc3e82397af9c076931185ce55b018a0b001a1ba6bb131148416bc05f&scene=21#wechat_redirect","title":"","type":null},"content":[{"type":"text","text":"機器之心曾對其進行過簡要介紹"}]},{"type":"text","text":"。該技術能自動爲大多數計算硬件生成可部署優化代碼,其性能可與當前最優的供應商提供的優化計算庫相比,且可以適應新型專用加速器後端。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"簡單來說,TVM可以稱爲許多工具集的集合,其中這些工具可以組合起來使用,來實現我們的一些神經網絡的加速和部署功能。這也是爲什麼叫做"},{"type":"text","marks":[{"type":"strong"}],"text":"TVM Stack"},{"type":"text","text":"了。TVM的使用途徑很廣,幾乎可以支持市面上大部分的神經網絡權重框架(ONNX、TF、Caffe2等),也幾乎可以部署在任何的平臺,例如Windows、Linux、Mac、ARM等等。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 1 萬多行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:3人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻: 7~10人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不定時維護。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Neuronika (國外\/開源\/機器學習框架)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:PyTorch\/ 機器學習框架"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/neuronika\/neuronika","title":"","type":null},"content":[{"type":"text","text":"Neuronika"}]},{"type":"text","text":" 是一個用 Rust 編寫的機器學習框架,與 PyTorch 類似,現已實現最常見的層組件(dense 層、dropout 層等),速度堪比 PyTorch。其構建重點在於易用性、快速原型開發和高效性能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Neuronika 是由 Francesco Iannelli 等人開發,他們現在是計算機科學的碩士生。該框架提供了自動微分和動態神經網絡,非常像 Pytorch。目前已經實現了最常見的層組件,如 dense 層、dropout 層、GRU、LSTM 和 1d-2d-3d CNN,然而,缺少池化層等等。Neuronika 還提供了損失函數、優化器、計算圖、張量和數據實用程序。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"速度方面,項目作者表示 Neuronika 的表現可與 PyTorch 媲美。你可以對它進行基準測試。但目前還不能支持 GPU。想要進行基準測試,可以參考測試文檔。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Neuronika 的核心機制是一種叫做反向模式自動微分機制( reverse-mode automatic differentiation),這種機制允許用戶在改變動態神經網絡時可以輕鬆實現,沒有任何開銷,可通過 API 運行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 26000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:2 人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:0 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新項目,目前還未有人貢獻。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"還未迭代出初始版本,但開發動態比較活躍。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"其他"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/tensorflow\/rust","title":"","type":null},"content":[{"type":"text","text":"TensorFlow-rs"}]},{"type":"text","text":",TensorFlow Rust 綁定,2021 年維護狀態,不太活躍。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/whatlang.org\/","title":"","type":null},"content":[{"type":"text","text":"Whatlang"}]},{"type":"text","text":",基於 Rust 實現的 自然語言 識別項目。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/vaaaaanquish\/Awesome-Rust-MachineLearning","title":"","type":null},"content":[{"type":"text","text":"Awesome-Rust-MachineLearning"}]},{"type":"text","text":",Rust 機器學習相關生態項目列表。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"遊戲"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"遊戲領域包括,使用 Rust 製作的遊戲、Rust 遊戲引擎、Rust 遊戲生態建設等。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"veloren"},{"type":"text","text":" (國外\/沙盒遊戲\/開源)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:沙盒遊戲\/ 我的世界"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/veloren\/veloren","title":"","type":null},"content":[{"type":"text","text":"Veloren"}]},{"type":"text","text":" 是用 Rust 開發的開源免費多玩家 voxel RPG。它的靈感來自諸如《魔方世界》,《塞爾達傳說:曠野之息》,《矮人要塞》和《我的世界》等遊戲。支持多人、單人,可以在Windows、Mac、Linux上游玩。點擊 "},{"type":"link","attrs":{"href":"https:\/\/veloren.net\/","title":"","type":null},"content":[{"type":"text","text":"官網"}]},{"type":"text","text":" 瞭解更多。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Veloren 應該是最早使用 Rust 的項目了,該項目在 2013 年就開始使用 Rust 開發,當時 Rust 還未 1.0 。截止到2021年的今天,該項目還保持着活躍更新。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Veloren 的創始人,也是 Rust 官方遊戲開發組成員之一。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 20 萬行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:15 人。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:175 人。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目迭代週期平均每三月發一個小版本。目前是 0.10.0 版。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"A \/ B Street (國外\/開源\/街景交通探索遊戲)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/a-b-street\/abstreet","title":"","type":null},"content":[{"type":"text","text":"A \/ B Street"}]},{"type":"text","text":" 是一個遊戲,探索城市對駕駛員,騎自行車者,過境用戶和行人的運動的小變化。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"遊戲最終目標是讓玩家成爲調整西雅圖(默認)基礎設施的真正建議,A\/B Street 使用"},{"type":"link","attrs":{"href":"https:\/\/www.openstreetmap.org\/about","title":"","type":null},"content":[{"type":"text","text":"OpenStreetMap"}]},{"type":"text","text":" ,所以遊戲可以是世界上任何一個地方。 A \/ B街當然是一個遊戲,使用簡化的交通建模方法,所以城市政府仍然必須使用現有方法來評估提案。 A \/ B Street旨在作爲與交互式可視化傳達想法的對話啓動器和工具,或者給城市規劃專家做參考。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼量及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 10 萬 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1 人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:24 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目從2018年3月11 啓動,截止到當前 2021年6月,一直高速迭代。迭代週期平均是每週一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Embark 公司 與 Rust 遊戲生態"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: Rust Game Ecosystem"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Embark 公司是 Johan Andersson (遊戲界知名人物)創建的遊戲工作室,在創建之初就選擇 Rust 作爲主要語言。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們相信,通過與社區公開分享我們的工作、問題和想法,我們將創造更多的合作和討論機會,使我們走向Rust和整個遊戲行業的偉大未來。 -- Johan Andersson (@repi), CTO, Embark"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"italic"}],"text":"在Embark,我們一直用 Rust 從頭開始構建自己的遊戲引擎。 我們在RLSL原型的內部開發方面擁有先前的經驗,我們擁有一支由出色的渲染工程師組成的團隊,他們熟悉遊戲,遊戲引擎和其他行業中當今着色器語言的問題。 因此,我們認爲我們處於解決這一問題的獨特位置。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們希望使用一種出色的語言簡化我們自己的內部開發,建立一個開源圖形社區和生態系統,促進GPU和CPU之間的代碼共享,最重要的是-使我們(未來的)用戶和其他開發人員擁有更多快速創建引人入勝的體驗。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"創建 Rust 遊戲生態並非口號,Embark 公司也加入了 Rust 遊戲工作組,並且創建了一系列打造 Rust 遊戲生態的庫。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這些庫都羅列在 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/EmbarkStudios\/rust-ecosystem","title":"","type":null},"content":[{"type":"text","text":"rust-ecosystem"}]},{"type":"text","text":" 倉庫中。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"embedcomp","attrs":{"type":"table","data":{"content":"
NameDescription
🌋 ash-moltenStatically linked MoltenVK for Vulkan on Mac using Ash
👷 buildkite-jobifyKubekite, but in Rust, using configuration from your repos
📜 cargo-aboutCargo plugin to generate list of all licenses for a crate
cargo-denyCargo plugin to help you manage large dependency graphs
🎁 cargo-fetchercargo fetch alternative for use in CI or other \"clean\" environments
⚙️ cfg-exprA parser and evaluator for Rust cfg() expressions
⛴️ discord-sdkAn open implementation of the Discord Game SDK in Rust
🚙 gsutilA small, incomplete replacement for the official gsutil
📦 kratesCreates graphs of crates from cargo metadata
🆙 octoborsGitHub action for automerging PRs based on a few rules
🎳 physxUse NVIDIA PhysX in Rust
🐦 puffinSimple instrumentation profiler for Rust
📓 relnotesAutomatic GitHub release notes
🐏 rpmalloc-rsCross-platform Rust global memory allocator using rpmalloc
🐉 rust-gpuMaking Rust a first-class language & ecosystem for GPU code
🆔 spdxHelper crate for SPDX expressions
🛠 spirv-tools-rsAn unofficial wrapper for SPIR-V Tools
🔆 superluminal-perfSuperluminal Performance profiler integration
📂 tame-gcsGoogle Cloud Storage functions that follows the sans-io approach
🔐 tame-oauthSmall OAuth crate that follows the sans-io approach
🧬 tame-oidcSmall OIDC crate that follows the sans-io approach
🎨 texture-synthesisExample-based texture synthesis generator and CLI example
💫 tryhardEasily retry futures"}}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其中最重要的一個庫是 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/EmbarkStudios\/rust-gpu","title":"","type":null},"content":[{"type":"text","text":"rust-gpu"}]},{"type":"text","text":",旨在讓 Rust 成爲建立GPU代碼的一流語言和生態系統。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"使用Rust的願望"},{"type":"text","text":" 爲GPU編寫程序 "},{"type":"text","marks":[{"type":"strong"}],"text":"不僅源於安全功能和高性能,"},{"type":"text","text":" 而且還需要獲得與軟件包和模塊一起使用的現代工具,以提高開發過程的效率。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"歷史上,在遊戲中,GPU編程是通過編寫HLSL完成的"},{"type":"text","text":" 或在較小程度上包括GLSL。 這些是簡單的編程語言,這些年來隨着渲染API一起發展。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是,隨着遊戲引擎的發展,這些語言還沒有提供處理大型代碼庫的機制,總的來說, "},{"type":"text","marks":[{"type":"strong"}],"text":"與其他編程語言相比,它們已經落後了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雖然一般來說,兩種語言都有更好的替代方法,但是都無法代替HLSL或GLSL。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"是因爲它們被提供程序阻止,還是因爲它們不受支持"},{"type":"text","text":" 與傳統的圖形管道。 "},{"type":"text","marks":[{"type":"strong"}],"text":"這樣的示例包括CUDA和OpenCL。"},{"type":"text","text":" 儘管已嘗試在此空間中創建語言,但沒有一個在gamedev社區中獲得明顯的吸引力。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Rust GPU繼續根據RLSL項目開發思想"},{"type":"text","text":",其中嘗試爲SPIR-V通用着色器中間件創建Rust編譯器,該編譯器在Vulkan API中提出,並在OpenGL 4.6中得到支持。在目前的開發階段,Rust GPU已經允許您運行簡單的圖形着色器並編譯Rust基本標準庫的重要部分。 同時,該項目還沒有爲廣泛使用做好準備,例如,着色器尚不支持循環。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基於Rust語言的代碼,形成了SPIR-V着色器的表示形式,爲此開發了一個Rust編譯器的特殊後端,該類後端類似於用來編譯成表示形式的Cranelift代碼生成器WebAssembly。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"當前的方法是支持Vulkan圖形API和SPIR-V視圖,"},{"type":"text","text":" 但是計劃在未來的DXIL(DirectX)和WGSL(WebGPU)着色器視圖中使用生成器。 基於Cargo和crates.io,正在開發工具來開發和發佈帶有SPIR-V格式的着色器的程序包。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"目前還屬於非常早期,以平均每週一個小版本迭代,現在發佈 0.3 版。主力開發大約六人,社區貢獻 35 人。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Bevy (國外\/遊戲引擎\/開源)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:遊戲引擎\/ ECS"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Bevy 是一個基於 Rust 實現的 數據驅動遊戲引擎。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Bevy完整實踐了時下比較熱門的data-driven開發理念, 也就是ECS模式。相比於其他架構比較老的開源引擎,比如Godot等,Bevy有一整套的從造輪子到遊戲開發落地的ECS開發模式。而和商業引擎相比,Bevy的歷史包袱也很少,不用像unity的DOTS開發一樣還需要兼容傳統的GameObject模式。此外,得益於Rust語言強大的表達能力,整個引擎在接口上看起來比用C++造的那些data-driven的輪子要簡潔明瞭的多。 -- "},{"type":"link","attrs":{"href":"https:\/\/zhuanlan.zhihu.com\/p\/356881497","title":"","type":null},"content":[{"type":"text","text":"《安利一個Rust Game Engine:Bevy--ECS部分》"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"相比於 Rust 實現的其他遊戲引擎,比如 Amethyst, Bevy 屬於後來着居上。Bevy 在 API 設計方面獨具匠心,充分利用 Rust 語言特點,讓開發者上手非常簡單方便。得力於其 Plugin 機制,目前 Bevy 已經逐漸形成自己的生態,逐步湧現出很多基於 Bevy 的 Plugin 。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊模式"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 65000 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:1 人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:244 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"項目啓動自 2019 年 11 月 10 號,目前發佈 0.5 版本,還處於高速迭代期。Bevy 項目也經歷過一次大的重構,重構了底層 ECS 系統。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"其他動態"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/gamedev.rs\/","title":"","type":null},"content":[{"type":"text","text":"https:\/\/gamedev.rs\/"}]},{"type":"text","text":" 是 Rust 遊戲工作組的官方站點,定期發佈 Rust 在遊戲生態中的動態。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/godot-rust\/godot-rust","title":"","type":null},"content":[{"type":"text","text":"godot-rust"}]},{"type":"text","text":",Godot 3.2 引擎的 Rust 綁定。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"客戶端開發"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"飛書 App (國內\/商業)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: lark\/ 字節跳動"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"字節跳動旗下 飛書(lark)App ,應該屬於國內最大的 Rust 開發團隊,全職寫 Rust 的開發人員大約在 30 ~ 60 人。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"飛書在 客戶端跨平臺組件中使用 Rust ,代碼量據說超過 55 萬行代碼 (包括測試和生成代碼)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其他信息目前不詳細。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"飛書團隊還開源了幾個 Rust 項目,可以在其"},{"type":"link","attrs":{"href":"https:\/\/github.com\/larksuite?q=&type=&language=rust&sort=","title":"","type":null},"content":[{"type":"text","text":" GitHub 倉庫"}]},{"type":"text","text":"中查閱。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"區塊鏈\/數字貨幣"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"區塊鏈\/數字貨幣領域包括,區塊鏈基礎設施、數字貨幣項目等。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Diem (國外\/開源\/Libra\/ 超主權貨幣)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:libra\/ Facebook"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/diem\/diem","title":"","type":null},"content":[{"type":"text","text":"Diem"}]},{"type":"text","text":" 前身是 Libra,其使命是建立一套簡單的、無國界的貨幣和爲數十億人服務的金融基礎設施。他們努力打造一個新的去中心化區塊鏈、一種低波動性加密貨幣和一個智能合約平臺的計劃,以期爲負責任的金融服務創新開創新的機遇。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他們認爲,應該讓更多人享有獲得金融服務和廉價資本的權利,每個人都享有控制自己合法勞動成果的固有權利。他們相信,開放、即時和低成本的全球性貨幣流動將爲世界創造巨大的經濟機遇和商業價值,並堅信人們將會越來越信任分散化的管理形式。全球貨幣和金融基礎設施應該作爲一種公共產品來設計和管理。所有人都有責任幫助推進金融普惠,支持遵守網絡道德規範的用戶,並持續維護這個生態系統的完整性。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最新狀態:Facebook旗下數字貨幣項目Diem放棄申請瑞士支付牌照:專注美國市場 (2021年05月13日 )。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 30 萬 行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:5~ 20 人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:150 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"平均每月一個小版本,目前主框架 1.2.0 版,sdk 0.0.2 版。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Substrate (國外\/ 開源\/ 區塊鏈框架)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字: parity\/substrate"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/paritytech\/substrate","title":"","type":null},"content":[{"type":"text","text":"Substrate"}]},{"type":"text","text":" 是Parity Polkadot 旗下的項目。 Polkadot 是基於 Substrate 構建的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Substrate 框架被稱爲下一代區塊鏈框架,類似於Java的Spring、Python的Django,只不過後者創建的是網站,前者創建的是區塊鏈。它由Parity團隊基於Rust語言開發而成,是一個開箱即用的區塊鏈構造器。基於Substrate創建區塊鏈可以讓開發者專注於業務需求,不需從頭實現底層的P2P網絡和共識邏輯。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼量大約爲 35 萬行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:4~10人"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:243 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Substrate 經過兩次大的版本迭代,已發展到了 V3.0 版。目前迭代週期平均每月一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Nervos CKB (國內\/ 區塊鏈公鏈)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關鍵字:nervos\/ ckb\/ cita"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Nervos Network 是一個開源的公鏈生態,包含以區塊鏈技術爲核心、相互兼容的一組分層協議,來解決區塊鏈可擴展性上的困境。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/nervosnetwork\/ckb","title":"","type":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Nervos CKB"}]},{"type":"text","text":"(Common Knowledge Base 共同知識庫)是一個無需許可的公有區塊鏈,在區塊鏈中,這裏提到的共同知識庫通常指的是經過全球節點共同驗證並確認的狀態。 和比特幣類似,"},{"type":"text","marks":[{"type":"strong"}],"text":"Nervos CKB"},{"type":"text","text":" 是一個狀態驗證系統。由杭州祕猿科技研發。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"祕猿也算國內 Rust 開發人員衆多的公司之一,Rust 全職開發大約是 30 + 人。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"代碼量及團隊規模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"單 ckb 項目代碼量,大約 11 萬行 Rust 代碼。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"團隊規模:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"主力開發:6 ~ 8 人(單ckb項目)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"社區貢獻:22 人"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"項目週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"開發週期大約每週一個小版本。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"其他區塊鏈項目"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/near","title":"","type":null},"content":[{"type":"text","text":"Near"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/solana-labs\/solana","title":"","type":null},"content":[{"type":"text","text":"Solana"}]}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"其他 Rust 正在革新的領域"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"機器人:"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/eclipse-zenoh\/zenoh","title":"","type":null},"content":[{"type":"text","text":"zenoh"}]},{"type":"text","text":" ,zenoh 將動態數據、使用中數據、靜態數據與計算整合。它巧妙地將傳統的發佈\/訂閱與地理上分散的儲存、查詢和計算融合,同時保有遠勝任何主流堆棧的時間和空間效率。zenoh 可作爲 ROS2 中間件 DDS 替代品,也可以和 DDS 無縫集成。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"航天航空:"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新西蘭 公司"},{"type":"link","attrs":{"href":"https:\/\/www.rocketlabusa.com\/","title":"","type":null},"content":[{"type":"text","text":" Rocket Lab "}]},{"type":"text","text":"是小型衛星發射領域的全球領導者,和 NASA 、xSpace 都是合作伙伴。團隊有500人,而且每週都在增加。目前在使用 Rust 。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"非官方 航空航天工作組 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/AeroRust","title":"","type":null},"content":[{"type":"text","text":"AeroRust"}]},{"type":"text","text":" 創建了 "},{"type":"link","attrs":{"href":"http:\/\/areweinspaceyet.org\/","title":"","type":null},"content":[{"type":"text","text":"Are we "},{"type":"text","marks":[{"type":"strong"}],"text":"in space"},{"type":"text","text":" yet?"}]},{"type":"text","text":" 網站,跟蹤 Rust 在航空航天領域的開源項目。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"汽車\/自動駕駛:"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/erdos-project\/erdos","title":"","type":null},"content":[{"type":"text","text":"erdos"}]},{"type":"text","text":",用於構建自動駕駛汽車和機器人應用的數據流系統。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"編程語言:"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rust-lang\/rust","title":"","type":null},"content":[{"type":"text","text":"Rust"}]},{"type":"text","text":",Rust 語言早已實現了自舉,算得上是世界上最大的 Rust 項目之一了。其代碼量大約 179 萬行 Rust 代碼。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/alilleybrinker\/langs-in-rust","title":"","type":null},"content":[{"type":"text","text":"langs-in-rust"}]},{"type":"text","text":" 這個網站羅列了 幾十種 用 Rust 實現的新編程語言。其中也不乏優秀之作。比如 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/gleam-lang\/gleam","title":"","type":null},"content":[{"type":"text","text":"Gleam"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/pistondevelopers\/dyon","title":"","type":null},"content":[{"type":"text","text":"Dyon"}]},{"type":"text","text":" \/ "},{"type":"link","attrs":{"href":"https:\/\/github.com\/koto-lang\/koto","title":"","type":null},"content":[{"type":"text","text":"Koto"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno","title":"","type":null},"content":[{"type":"text","text":"deno"}]},{"type":"text","text":",嚴格來說,deno 不算語言,只是 typescript\/javascript 運行時。但是它的 Rust 成分佔了 58.5%。比較有意思的是,作者最早使用 Cpp\/ Golang 來實現 deno,最終都已換成了 Rust 。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"藝術:"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/nannou.cc\/","title":"","type":null},"content":[{"type":"text","text":"nannou"}]},{"type":"text","text":",旨在讓藝術家創作自己的藝術。在德國 "},{"type":"link","attrs":{"href":"https:\/\/mindbuffer.net\/","title":"","type":null},"content":[{"type":"text","text":"mindbuffer"}]},{"type":"text","text":" 公司就是基於 nannou 和 koto 來創建實體藝術項目:使用486步進電機,86,000個LED和5通道顆粒式合成引擎,"},{"type":"link","attrs":{"href":"https:\/\/t.me\/rust_daily_news\/4863","title":"","type":null},"content":[{"type":"text","text":"創建可以變換形狀絢麗多彩的電子藝術品"}]},{"type":"text","text":"。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"VR 領域:"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/makepad\/makepad","title":"","type":null},"content":[{"type":"text","text":"makepad"}]},{"type":"text","text":",是一個 VR,Web和本機渲染UI框架 和 IDE,基於 Rust 和 WebAssembly (WebGL) 技術。 作者是 Cloud9 IDE 的創始人。該項目也包含"},{"type":"link","attrs":{"href":"https:\/\/github.com\/makepad\/makepad_docs","title":"","type":null},"content":[{"type":"text","text":"白皮書"}]},{"type":"text","text":",闡述了它的願景。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"安全領域:"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rustscan\/rustscan","title":"","type":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"rustscan"}]},{"type":"text","text":",是一個現代化高性能的端口掃描器,並且提供腳本引擎來支持運行 Python,Lua,Shell。支持 自適應學習(Adaptive learning)。用的越多,RustScan 越智能,不是基於臃腫的機器學習,主要是基於基本數學。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/epi052\/feroxbuster","title":"","type":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"feroxbuster"}]},{"type":"text","text":",一款高性能的內容發現工具,用於滲透測試。feroxbuster 使用蠻力結合單詞列表在目標目錄中搜索未鏈接的內容,這是一種攻擊行爲。這些資源可能存儲有關 Web 應用程序和操作系統的敏感信息,例如源代碼,憑據,內部網絡尋址等。此攻擊也稱爲可預測資源位置,文件枚舉,目錄枚舉和資源枚舉。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/zero-gear\/rusty-tor","title":"","type":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"rusty-tor"}]},{"type":"text","text":",一個概念驗證的 Tor 客戶端。不過有兩年沒有維護了。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/EgeBalci\/amber","title":"","type":null},"content":[{"type":"text","text":"amber"}]},{"type":"text","text":", 號稱首款 反射式 PE 打包器,目前開發很活躍。amber 提供的打包方法,可以改變將惡意軟件傳送到系統的方式。 通過嘗試通過無文件代碼注入將有效負載傳遞到系統,可以直接繞過大多數安全機制,而不是嘗試尋找提供機器學習數據集的新的反檢測技術。 使用這種新的打包方法,可以將已編譯的PE文件轉換爲可與常見軟件漏洞(例如緩衝區溢出)一起使用的多階段感染有效負載。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/kpcyrd\/sn0int","title":"","type":null},"content":[{"type":"text","text":"sn0int"}]},{"type":"text","text":", 半自動高級公開資源情報(OSINT)框架和程序包管理器,用於掃描目標IP地址、電子郵件、網站和組織信息,並從不同消息源收集各種情報信息。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/kpcyrd\/sniffglue","title":"","type":null},"content":[{"type":"text","text":"sniffglue"}]},{"type":"text","text":",多線程網絡嗅探器。Kpcyrd 經常使用tcpdump,但他認爲輸出更友好的話會更好,並且 wireshark 也經常存在漏洞,tcpdump 有時也有漏洞,所以他用 Rust 實現了這個工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/kpcyrd\/badtouch","title":"","type":null},"content":[{"type":"text","text":"badtouch"}]},{"type":"text","text":", 可編寫腳本的網絡身份驗證破解程序。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/kpcyrd\/rshijack","title":"","type":null},"content":[{"type":"text","text":"rshijack"}]},{"type":"text","text":",用 Rust 重寫了 shijack,實現 TCP 會話劫持。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rust-fuzz\/cargo-fuzz","title":"","type":null},"content":[{"type":"text","text":"Cargo Fuzz"}]},{"type":"text","text":",Rust 官方開發的 Fuzz 工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/rust-fuzz\/honggfuzz-rs","title":"","type":null},"content":[{"type":"text","text":"honggfuzz-rs"}]},{"type":"text","text":",Google 開發的 Fuzz 工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/phayes\/sidefuzz","title":"","type":null},"content":[{"type":"text","text":"Sidefuzz"}]},{"type":"text","text":", 側信道漏洞檢測工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/RustSec\/advisory-db\/","title":"","type":null},"content":[{"type":"text","text":"RustSec\/advisory-db"}]},{"type":"text","text":",通過"},{"type":"link","attrs":{"href":"https:\/\/github.com\/RustMagazine\/rust_magazine_2021\/blob\/main\/src\/chapter_5\/crates.io","title":"","type":null},"content":[{"type":"text","text":"crates.io"}]},{"type":"text","text":"發佈的Rust Crate 的安全諮詢數據庫。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/RustSec\/cargo-audit","title":"","type":null},"content":[{"type":"text","text":"cargo-audit"}]},{"type":"text","text":","},{"type":"codeinline","content":[{"type":"text","text":"Cargo.lock"}]},{"type":"text","text":"中依賴審查工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/crev-dev\/cargo-crev","title":"","type":null},"content":[{"type":"text","text":"cargo-crev"}]},{"type":"text","text":",代碼 Review 工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/cortex\/ripasso\/","title":"","type":null},"content":[{"type":"text","text":"ripasso"}]},{"type":"text","text":",一款密碼管理工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/arvancloud\/libinjection-rs","title":"","type":null},"content":[{"type":"text","text":"libinjection-rs"}]},{"type":"text","text":", 對 libinjection 的 Rust 綁定,libinjection 是一款 SQL 注入工具。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/kostassoid\/lethe","title":"","type":null},"content":[{"type":"text","text":"lethe"}]},{"type":"text","text":",安全,免費,跨平臺和開源的驅動擦除工具。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"盤點在生產環境使用 Rust 的公司"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"國內"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"華爲"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"可信編程的願景之旅,纔剛剛開始。我們希望與 Rust 社區,以及即將成立的 Rust 基金會合作,爲電信軟件行業帶來一場平穩的革命。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"華爲於 2021 年加入 Rust 基金會,旨在爲 Rust 在全球推廣和發展做貢獻。目前在一些開源項目和內部試點項目使用了 Rust ,以及爲 Rust 生態做了一些貢獻。目前正在爲大規模使用 Rust 做準備。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"華爲也是 Rust Conf China 2020 戰略級贊助商。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"PingCAP 及其 客戶"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"PingCAP 公司創造的 分佈式數據庫 TiDB,底層TiKV分佈式存儲是基於 Rust 實現的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/pingcap.com\/cases-cn\/","title":"","type":null},"content":[{"type":"text","text":"TiDB 現已被 "},{"type":"text","marks":[{"type":"strong"}],"text":"1500"},{"type":"text","text":" 多家不同行業的領先企業應用在實際生產環境"}]},{"type":"text","text":"。客戶包括:中國移動\/ 中通快遞\/ 伴魚\/ 知乎\/ 網易遊戲\/ 美團\/ 京東雲\/ 360雲\/ 今日頭條 等等公司。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"PingCAP 也是 Rust Conf China 2020 銀牌贊助商。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"阿里\/螞蟻集團"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"阿里雲\/ 釘釘團隊,以及螞蟻集團 機密計算 和 數據庫團隊,都在使用 Rust 。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"字節跳動"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"字節跳動 飛書團隊 使用 Rust 進行跨平臺客戶端組件開發。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"字節跳動\/飛書 也是 Rust Conf China 2020 鑽石贊助商。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"知乎"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"知乎搜索引擎團隊在使用 Rust 。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"收錢吧"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"上海收錢吧團隊在生產環境使用 Rust 做消息隊列服務。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"吉利集團"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"吉利集團數字科技板塊在使用 Rust 構建區塊鏈。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"上海息未信息科技"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"上海息未信息科技有限公司專注於航天及航空訓練裝備的研發生產,是由國內頂級基金投資的科技企業,主要服務於中國航天、軍隊以及航空公司。其公司部分產品使用 Rust 。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"杭州祕猿科技"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"CBK 公鏈項目就是該公司產品。還有其兄弟公司 溪塔 也是 Rust 生產級用戶。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"祕猿和溪塔同是 Rust China Conf 2020 金牌贊助商。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"國內其他區塊鏈公司"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Bitfrost"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Bitfrost 也是區塊鏈項目,爲 Staking 提供流動性的跨鏈網絡。Rust China Conf 2020 銀牌贊助商。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"達爾文網絡"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"達爾文網絡是基於Substrate開發的去中心化橋接網絡,也是區塊鏈行業。Rust China Conf 2020 銀牌贊助商。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"還有很多其他區塊鏈公司,都在使用 Rust ,這裏就不一一羅列了。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"豆瓣"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"豆瓣使用了 Rust 開源庫 Vector ,應該屬於被動使用 Rust 。其他團隊是否在其他項目使用 Rust 猶未可知。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"國外"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Google"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Google Fuchsia OS 內 Rust 使用量大約爲 137 萬行 Rust 代碼,算的上是 Rust 生態圈內除 Rust 之外第二大 Rust 項目了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"並且 Google 極力支持 Rust for Linux 項目,還出資金贊助了核心開發。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Google 也是 Rust 基金會成員之一。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/security.googleblog.com\/2021\/04\/rust-in-android-platform.html","title":"","type":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Android"}]},{"type":"text","text":":"},{"type":"text","marks":[{"type":"italic"}],"text":"“在過去的 18 個月裏,我們一直在爲 Android 開源項目添加對 Rust 的支持。我們有幾個早期採用 Rust 開發的項目,我們將在未來幾個月內分享。將 Rust 擴展到更多操作系統,是我們的一個多年項目。”"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"微軟"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 基金會成員之一。目前 Windwos 已經全面支持 Rust 開發。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有沒有注意到 VS Code 的搜索速度有多快?原因是 VS Code 正在使用 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/BurntSushi\/ripgrep","title":"","type":null},"content":[{"type":"codeinline","content":[{"type":"text","text":"ripgrep"}]}]},{"type":"text","text":" 來"},{"type":"link","attrs":{"href":"https:\/\/code.visualstudio.com\/updates\/v1_11#_text-search-improvements","title":"","type":null},"content":[{"type":"text","text":"增強它的搜索能力"}]},{"type":"text","text":" 。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"AWS"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 基金會成員之一。AWS 應該是最早支持 Rust 社區的公司了,連續幾年贊助 Rust Conf。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在 AWS,我們喜歡 Rust,因爲它幫助 AWS 編寫高性能、安全的基礎設施級網絡和其他系統軟件。我們使用 Rust 提供的服務產品有很多,比如 Amazon 簡單存儲服務(Amazon S3)、Amazon 彈性計算雲(Amazon EC2)、Amazon CloudFront、Amazon Route 53 等等。最近我們推出了 Bottlerocket,這是一個基於 Linux 的容器操作系統,也是用 Rust 開發的。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Facebook"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 基金會成員之一。 Facebook 內部 Rust 項目綜合起來代碼已超 百萬行。著名的項目是 Diem 及其 MOVE 語言。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Facebook 目前也擁有一個團隊,專門爲 Rust 編譯器和庫做貢獻。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Mozilla"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 語言的誕生之地。Servo 瀏覽器內核項目使用 Rust 開發,代碼量大約爲 30萬 行 。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Apple"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"蘋果在招聘公告中寫到:“我們構建的系統的性能和安全性至關重要。目前使用異步 I\/O 和線程來分配工作負載,直接與底層 Linux 內核接口進行交互。首次成功使用 Rust 之後,我們正在將已建立的代碼庫從 C 遷移到 Rust,並計劃未來主要使用 Rust 構建新功能。”"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"蘋果目前沒有加入 Rust 基金會。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"1Password"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們在 1Password 的生產環境中,使用 Rust 已有幾年了。我們的 Windows 團隊是這項工作的領跑者,Windows 中所用的 1Password 7,大約 70% 都是用 Rust 開發的。在 2019 年底,我們還將 1Password Brain(驅動瀏覽器填充邏輯的引擎)從 Go 移植到了 Rust。這樣,我們就可以在瀏覽器擴展中,發揮將 Rust 程序部署到 WebAssembly 應用的性能優勢。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Cloudflare"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"隨着我們 Rust 開發經驗的增長,Rust 語言在另外兩個方面顯示出了優勢:作爲一種具有強大內存安全性語言,它是邊緣計算的一個絕好選擇;作爲一種具有極大熱情的語言,它成爲一種流行於組件重新開發(de novo)的語言。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Discord"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當開始一個新的項目或組件時,我們首先考慮使用 Rust。當然,我們只在適合的地方使用。除了性能之外,Rust 對工程團隊也有很多優勢。例如,它的類型安全性和借用\/引用檢查器,使重構代碼變得非常容易。此外,Rust 的生態系統和工具都非常出色,背後有着巨大的動力。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"IBM"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IBM 的一個團隊使用 WebAssembly 和 Rust,實現了難以置信的性能改進。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Dropbox"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們用 Rust 開發了 "},{"type":"codeinline","content":[{"type":"text","text":"Nucleus"}]},{"type":"text","text":"!Rust 幫助我們團隊力量倍增,選擇 Rust 是我們做出的最好決定之一。Rust 的人機工程學和正確原則,不僅有助於我們馴服 "},{"type":"codeinline","content":[{"type":"text","text":"sync"}]},{"type":"text","text":" 的複雜性。而且,我們可以在類型系統中,對系統進行復雜的不變量編碼,並讓編譯器爲我們檢查它們。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"npm"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"npm 的第一個 Rust 程序,在一年半的生產環境中,沒有發生任何警報。‘我對 Rust 最大的讚美,是它很無聊’,Dickinson說,‘這是一個令人驚奇的讚美’。部署新的 Rust 服務的過程是直接的,很快,他們就能夠忘記這項 Rust 服務,因爲它只引起很少的操作問題。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"OneSignal"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"就在這個月,我們突破了每天發送 70億 條通知的門檻,並創下了每秒 175 萬條的記錄。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Qovery"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"隨着公司意識到雲計算的好處,Rust 的勢頭就越來越強勁。Dropbox 使用 Rust 重寫了它的一些核心系統,而 Mozilla 使用 Rust 構建了 Firefox 瀏覽器引擎,展示了 Rust 強大的優勢。在 Qovery,我們相信 Rust 能夠雲構建的未來。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Astropad"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有了 Rust,我們將擁有一個高性能、可移植的平臺,可以輕鬆地在 Mac、iOS、Linux、Android,以及 Windows 上運行。這不僅極大地擴大了我們潛在的市場規模,而且還看到了我們的 "},{"type":"codeinline","content":[{"type":"text","text":"LIQUID"}]},{"type":"text","text":" 技術的許多有趣的新用途。我們有信心用以強大的代碼、更好的產品和對 Astropad 未來的樂觀展望,以完成我們的 Rust 之旅。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Coursera"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們在增強的 Docker 容器中,高效、可靠、安全地爲提交的作業評分。雖然我們將集羣調度到 Amazon EC2 容器服務(ECS)上,但許多程序之間協同工作,是用 Rust 開發的。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"三星"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"italic"}],"text":"我們想向 Rust 語言的 5 個核心團隊、Mozilla,以及 Rust 語言生態系統中衆多軟件包的貢獻者們公開道謝:我們正在利用 Rust 開發新的更新客戶端和服務器,以及其他一些軟件的主幹,並希望隨着時間的推移,繼續擴大我們對該語言的使用。”"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"System76"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"像我們今天的所有項目一樣,它是用 Rust 編寫的,並且遵循當前的最佳實踐。該項目被配置爲一個工作區,核心 crate 提供了一個通用庫,用於從多個固件服務中發現和管理固件。支持 "},{"type":"codeinline","content":[{"type":"text","text":"fwupd"}]},{"type":"text","text":" 和 "},{"type":"codeinline","content":[{"type":"text","text":"system76-firmware"}]},{"type":"text","text":"。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Clever Cloud"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對我們來說,這些好處有力地證明了 Rust 是生產平臺的可靠構建塊。這是一段我們不必擔心的代碼,它將使其它服務能夠安全地運行。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Rapid7"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們在 Rust 部署中,看到的主要加速點是,不同平臺上的部署工具,能夠很容易地適應該語言。代理開發人員,能夠很快地學習該語言,並開發與託管運行時的集成。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Figma"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雖然我們有一些挫折,但我想強調的是,我們在 Rust 方面的經驗,總體上是非常積極的。這是一個非常有前途的項目,我們擁有堅實的核心和健康的社區。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Fly.io"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們基礎設施中的每臺服務器,都在運行一個名爲 fly-proxy 的基於信任的代理。此代理負責接受客戶端連接、將其與客戶應用程序匹配、應用處理程序(例如:TLS終止)以及服務器之間的回程處理。"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"Everlane"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Rust 給予我們鍛造性。這項服務已經在生產環境運行 4 個月了,它平均每秒處理 40 個請求,響應時間爲 10ms。它的內存使用量很少超過 100MB。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"還有很多公司,可以在 Rust 官網裏看到介紹 :"},{"type":"link","attrs":{"href":"https:\/\/www.rust-lang.org\/production\/users","title":"","type":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Rust Production users"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"作者簡介:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"張漢東 ,《Rust 編程之道》作者,獨立企業諮詢顧問,開源愛好者。喜歡讀書、寫作、分享,歡迎交流。"}]},{"type":"heading","attrs":{"align":null,"level":2}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章