FreeBSD 開(kāi)發(fā)者正在考慮允許在 FreeBSD 基礎(chǔ)系統(tǒng)中使用 Rust 編程語(yǔ)言的好處和成本。
郵件寫道,在 FreeBSD 基礎(chǔ)系統(tǒng)使用 Rust 的主要缺點(diǎn)是構(gòu)建時(shí)間加倍。這是因?yàn)樾枰幾g基于 LLVM 的 Rustc 編譯器和 Rust 的所有附加功能,這些操作使得基礎(chǔ)系統(tǒng)的構(gòu)建時(shí)間大約是當(dāng)前的兩倍。
如果 FreeBSD 基礎(chǔ)系統(tǒng)采用了 Rust,開(kāi)發(fā)者可以重新 Rust 重寫許多組件 —— 而不是使用 C++,例如 ZFS 守護(hù)進(jìn)程 (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
+關(guān)注
關(guān)注
0文章
37瀏覽量
10818 -
rust語(yǔ)言
+關(guān)注
關(guān)注
0文章
57瀏覽量
3029
原文標(biāo)題:FreeBSD也要 “銹化”?
文章出處:【微信號(hào):OSC開(kāi)源社區(qū),微信公眾號(hào):OSC開(kāi)源社區(qū)】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
初始化ADS1255的時(shí)候,總是不能正確配置寄存器,怎么解決?
簡(jiǎn)單認(rèn)識(shí)libmodbus開(kāi)發(fā)庫(kù)
![簡(jiǎn)單認(rèn)識(shí)libmodbus開(kāi)發(fā)庫(kù)](https://file1.elecfans.com/web1/M00/F4/F5/wKgZoWc0WO2AbJmpAAAztc5uoPA692.png)
虛擬化數(shù)據(jù)恢復(fù)—UFS2文件系統(tǒng)數(shù)據(jù)恢復(fù)案例
戴爾科技助力樂(lè)天集團(tuán)擴(kuò)展混合多云IT基礎(chǔ)設(shè)施
運(yùn)放輸入端不是以信號(hào)幅值為主嗎?為什么有些應(yīng)用輸入也要匹配到50Ω?
請(qǐng)問(wèn)雙極性運(yùn)放的同向輸入端也要提供偏置電流的工作點(diǎn)嗎?
THS4131空載也要消耗32mA左右的電流,發(fā)熱嚴(yán)重是什么原因?怎么解決?
freebsd和linux哪個(gè)好用
第6章_libmodbus使用
![第6章_libmodbus使用](https://file1.elecfans.com/web2/M00/F6/81/wKgaomZ_qzqASnwhAAC9vS2QtWc321.png)
高效辦公也要兼顧信息安全,WeLink 為企業(yè)數(shù)字化轉(zhuǎn)型保駕護(hù)航
如果要設(shè)計(jì)一個(gè)電阻應(yīng)變式傳感器測(cè)重量系統(tǒng),請(qǐng)問(wèn)怎么設(shè)定測(cè)量的multisim電路和重量的范圍,最后也要變成0-10V輸出呢?
5芯M8接頭需做防腐耐銹工藝嗎
![5芯M8接頭需做防腐耐<b class='flag-5'>銹</b>工藝嗎](https://file1.elecfans.com/web2/M00/C6/54/wKgaomX9JraAfrffAADMjZr3SK0688.png)
評(píng)論