FreeBSD 開發者正在考慮允許在 FreeBSD 基礎系統中使用 Rust 編程語言的好處和成本。
郵件寫道,在 FreeBSD 基礎系統使用 Rust 的主要缺點是構建時間加倍。這是因為需要編譯基于 LLVM 的 Rustc 編譯器和 Rust 的所有附加功能,這些操作使得基礎系統的構建時間大約是當前的兩倍。
如果 FreeBSD 基礎系統采用了 Rust,開發者可以重新 Rust 重寫許多組件 —— 而不是使用 C++,例如 ZFS 守護進程 (zfsd)、重寫 devd、WiFi 用戶空間代碼也可以受益于用 Rust 編寫,等等。列舉部分如下:
* ctl-exporter (I started this, but discovered that the CTL stats API is
unstable, so it can't live in ports. Instead, I had to do it in C).
https://github.com/freebsd/freebsd-src/commit/1a7f22d9c211f504f6c48a86401469181a67ec34
* fusefs tests. Absolutely impossible to do in C. I considered Rust, but went
with C++ so they could live in base. They are too closely coupled to
fusefs(5) to live out-of-tree.
https://github.com/freebsd/freebsd-src/tree/main/tests/sys/fs/fusefs
* devd. Currently C++, but imp suggested a rewrite.
https://github.com/freebsd/freebsd-src/tree/main/sbin/devd
* zfsd. Currently C++, but I've long pondered a rewrite. Using Rust would
make it more testable.
https://github.com/freebsd/freebsd-src/tree/main/cddl/usr.sbin/zfsd
* nscd. Currently C, but confusing and with no test coverage. I've
contemplated a rewrite myself, but I don't want to do it in C.
https://github.com/freebsd/freebsd-src/tree/main/usr.sbin/nscd
* The userland portion of the 802.11ac and Lightning stacks. scottl suggested
that these were good candidates for Rust.
* freebsd-kpi-r14-0 . https://crates.io/crates/freebsd-kpi-r14-0
審核編輯:劉清
-
freebsd
+關注
關注
0文章
37瀏覽量
10946 -
rust語言
+關注
關注
0文章
57瀏覽量
3119
原文標題:FreeBSD也要 “銹化”?
文章出處:【微信號:OSC開源社區,微信公眾號:OSC開源社區】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
如何選擇合適的數智化光伏電站解決方案?

智能車載終端為什么也要求保密性高?

模塊化示波器的技術原理和應用
初始化ADS1255的時候,總是不能正確配置寄存器,怎么解決?
簡單認識libmodbus開發庫

虛擬化數據恢復—UFS2文件系統數據恢復案例
RAID5數據恢復—如何重組RAID5陣列?

運放輸入端不是以信號幅值為主嗎?為什么有些應用輸入也要匹配到50Ω?
請問雙極性運放的同向輸入端也要提供偏置電流的工作點嗎?
THS4131空載也要消耗32mA左右的電流,發熱嚴重是什么原因?怎么解決?
freebsd和linux哪個好用
第6章_libmodbus使用

評論