【Rust日報】2020-03-10 - A C# programmer 嘗試 Rust - Part 1

2021-02-19 Rust語言中文社區
對 Rust build pattern 的新思考 - Init Struct Pattern

文章淺顯易懂,有一些有價值的思考,推薦閱讀:

https://xaeroxe.github.io/init-struct-pattern/

用 Rust 寫的 NATS 監控 web app

Rust warp web框架寫的後端。NATS[https://nats.io/]

NATS.io is a simple, secure and high performance open source messaging system for cloud native applications, IoT messaging, and microservices architectures.

https://github.com/sphqxe/NATS-WebUI

Cloudsmith 支持直接上傳 Cargo 包到他們的雲平臺

可以直接使用 cargo publish 上傳。

構建私源( a private 『single source of truth』 )的幾個優點,他寫了:

Can be managed, secured and controlled in a systematic way

Is available to teams and individuals within the organization anywhere in the world via a 『web-scale』 cloud infrastructure

Can be distributed on a commercial/licensed basis if necessary on the same basis

Supports assets all common languages and formats (Rust and Cargo being just one of dozens of supported formats)

https://blog.cloudsmith.io/2020/03/09/announcing-native-cargo-uploads-in-cloudsmith/

A C# programmer 嘗試 Rust - Part 1

推薦閱讀。

附帶贈送一個小小的性能評測。

Test Elapsed Milliseconds Peak Memory Usage Memory Usage After Processing Memory Usage After Gen2 GC
C# - Imperative 5444 3.4GB 3.4GB 2.05GB
C# - Declarative 6785 3.2GB 3.2GB 1.9GB
Rust - Declarative 2851 859MB 464MB N/A

https://treit.github.io/programming,/rust,/c%23/2020/03/06/StartingRust.html

wasm-tetris - Rust 寫的 Tetris 克隆

俄羅斯方塊啦,網頁上運行的。

https://github.com/ha-shine/wasm-tetris

From 日報小組 Mike

相關焦點

  • 【Rust日報】 Rust 2021-穩定性
    文章連結,https://jackh726.github.io/rust/2020/10/01/rust-2021.htmlRust如何使我們監控30k/min的API調用在Bearer,我們是一個多語言的工程師團隊。無論是交流的語言,還是變成的語言。我們的技術棧是由Node.js,Ruby,Elixir,以及我們代理庫支持的所有語言之外的其他語言寫的服務組成。
  • 【Rust日報】 2019-11-15 RustyBox 一個完全用rust重寫的 BusyBox
    RustyBox 一個完全用rust重寫的 BusyBox真的是很猛busybox是linux開發者最常用的一套cmd
  • 【Rust日報】2020-09-25 構建一個Rust運行時反射系統(第一篇)
    為了方便大家了解它們的Polar語言,我在他們官網摘了一小段:allow(actor: String, "GET", _expense: Expense) if actor.endswith("@example.com");連結:https://www.osohq.com/post/rust-reflection-pt-1Building
  • 【Rust日報】2020-08-15 Rust Nightly 標準庫文檔已涵蓋了每個關鍵字
    詳細可查看這三個連結:標準庫:https://doc.rust-lang.org/stable/std/#keywordsunsafe 關鍵字:https://github.com/rust-lang/rust/pull/73943原始類型關鍵字:https://github.com/rust-lang/rust/issues/34601學習Rust,沮喪?
  • 【Rust日報】 2019-08-10:號外:Rust.cc中文社區尋找線下meetup組織者和參與者​
    每個城市的讀書學習會,並不是孤立的,而是由Rust日報和論壇組來幫助大家分享每周的學習心得。每個同城群邀請我和Mike駐場,作為觀察者,來對大家的學習狀態進行觀察和報導。當然,誰想作為觀察者也可以報名。本著公平自願原則,完全自願組織參加。目前北京回龍觀群友已經在策劃這樣的活動,先嘗試一段時間看看。
  • 【Rust每周閱讀】2019-12-28
    v=TF-tXDRAEmg&feature=youtu.beCloser Scrutiny of Rust Collectionshttps://blog.knoldus.com/closer-scrutiny-of-rust-collections/Getting Hands-On with Wasm
  • 【Rust blog】細說Rust錯誤處理
    程序報錯,列印內容如下:No such file or directory (os error 2)在Rust代表中,Result是一個enum枚舉對象:pub enum Result<T, E> { /// Contains the success value Ok(#[stable(feature = "rust1
  • 【Rust日報】 2019-08-28:Rust異步代碼的優勢:相比於其他語言更加容易調試
    Part I: https://medium.com/dwelo-r-d/using-c-libraries-in-rust-13961948c72a Part II:https://medium.com/dwelo-r-d/wrapping-unsafe-c-libraries-in-rust-d75aeb283c65使用async/await構建高性能TCP客戶端#async
  • 【Rust日報】2020-08-13 關於群集(Bevy)引擎ECS框架中system的語法糖是怎麼實現的
    宏的部分十分值得仔細研究,推特原文作者也是正在研究其中的東西,截至日報更新時還沒有新的成果,後續可以直接去關注該條推特。推文連結:https://twitter.com/yaahc_/status/1293567953875505152?s=20Rust寫數據可視化的一個小教程該文用到了plotly庫,是一個可以動手實驗的小教程。
  • Rust belt?
    They have been abandoned for so long that the conveyor belts have begun to gather rust – or become rusty.
  • Rust 語言常用技巧匯集
    Racer,Clippy,rustfmt和fix這是非常好用的一組工具。Racer用來幫助你對rust代碼進行補全。安裝rustfmt,使用:rustup component add rustfmt然後工作區中運行rustfmt:cargo fmt。
  • 為什麼選擇Rust?
    作者:Dmitriy Kashitsyn@Parity Technologies翻譯:孫元超@Cdot Network來源:https://www.parity.io/why-rust在後一種情況下,你將與編譯器發生衝突,因為你嘗試的幾乎所有操作都會導致內存安全問題。上圖右側部分顯示了並發性和內存安全相關的問題,這些問題根源上不可能發生在常規(非unsafe塊)Rust代碼中。所以只需要換成Rust,他們就可以杜絕這段時間內大約一半的bug。同時,緩衝區溢出是其中最危險的bug,因為它們常常導致「密鑰洩露」、拒絕服務和遠程代碼執行漏洞。
  • VS Code 搭建 Rust 開發環境
    安裝 VS Code下載安裝包 VSCodeUserSetup-x64[1]一路單擊到底就安裝好了。rustrust在控制臺輸入 rustc rust_hello_world.rsrust運行可執行文件 rust_hello_world.exe 查看結果
  • Rust 1.48.0 發布 - OSCHINA - 中文開源技術交流社區
    具體更新內容如下:Easier linking in rustdocRustdoc 是 Rust 發行版中包含的庫文檔工具,可以讓你用 Markdown 編寫文檔。在 1.48.0 版本中,Rustdoc 能夠使用 item 路徑作為連結直接連結到 Markdown 文檔中的其他 rustdoc 頁面。
  • Rust 語言新人入門指南
    如果你抱著之前 1 天上手 Python, 2 天入門 Go 的經驗和優越感來學習 Rust 的話,你可能會遭遇嚴重的失敗感。如果你來自 Haskell/Ocaml 等函數式語言社區,你會有相當的親切感。對於有豐富 C++ 開發經驗的同學來說,上手可能相對比較容易。
  • Rust 中的錯誤處理 - Rust 實踐指南
    在 main 方法中對錯誤適當處理處理嘗試打開不存在的文件時發生的錯誤,是通過使用 error-chain crate 來實現的。下述代碼嘗試將值 256 反序列化為 u8。首先 Serde 產生錯誤,然後是 csv,最後是用戶代碼。use error_chain::error_chain;use serde::Deserialize;use std::fmt;error_chain!
  • 腐蝕rust閃退怎麼辦 腐蝕rust程序退出解決方法
    很多玩家在進入腐蝕rust 解決方法 我用的是win10系統 打開任務管理器,在進程裡找到mycolor2 滑鼠右鍵 結束任務再登錄rust 成功解決!
  • Rust search extension 0.7 發布!快速搜索 Rust 文檔、屬性和庫的...
    Reddit帖子:Announcing rust-search-extension v0.7! Search std docs, crates, error codes, and attributes in your address bar instantly!
  • Rust 語言入門
    is running", std::thread::current().id()); 6   thread::sleep(Duration::from_millis(1)); 7} 8 9fn main() {10   let mut v = vec!
  • 【Rust日報】2020-11-21 使用 const 泛型的物理單位
    = distance * mass / (1.8* s *2.0* s); assert_eq! 發布了 v0.1.1 和 v0.1.5 Github連結,https://github.com/knurling-rs Lunatic Lunatic,用於構建使用 WebAssembly 實例作為 actors 的 Actor 系統平臺。