0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

FreeBSD也要 “锈化”?

OSC开源社区 来源:OSC开源社区 2024-01-24 10:22 次阅读

FreeBSD 开发者正在考虑允许在 FreeBSD 基础系统中使用 Rust 编程语言的好处和成本。

aa118d20-b9dd-11ee-8b88-92fbcf53809c.png


邮件写道,在 FreeBSD 基础系统使用 Rust 的主要缺点是构建时间加倍。这是因为需要编译基于 LLVM 的 Rustc 编译器和 Rust 的所有附加功能,这些操作使得基础系统的构建时间大约是当前的两倍。

aa19e038-b9dd-11ee-8b88-92fbcf53809c.png

如果 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

    文章

    36

    浏览量

    10698
  • rust语言
    +关注

    关注

    0

    文章

    58

    浏览量

    2958

原文标题:FreeBSD也要 “锈化”?

文章出处:【微信号:OSC开源社区,微信公众号:OSC开源社区】欢迎添加关注!文章转载请注明出处。

收藏 人收藏

    评论

    相关推荐

    stm32h750既要实现主机,也要实现从机功能,要怎么实现呢?

    STM32_USB_Device_Library和STM32_USB_Host_Library。请问下,H750既要实现主机,也要实现从机功能,要怎么实现呢?有什么资料可以参考下吗?
    发表于 03-19 06:46

    freebsd为什么比linux稳定

    FreeBSD是一个自由、开源的类Unix操作系统,它以其卓越的稳定性而闻名。与Linux相比,FreeBSD在稳定性方面有以下几个方面的优势: 代码质量和设计哲学:FreeBSD的内核和用户空间
    的头像 发表于 12-08 10:27 672次阅读

    代码规范如何学习,单片机也要求规范吗?

    代码规范如何学习,单片机也要求规范么?
    发表于 10-12 07:19

    LSI 3ware FreeBSD 3DM2和CLI安装程序10.1

    电子发烧友网站提供《LSI 3ware FreeBSD 3DM2和CLI安装程序10.1.zip》资料免费下载
    发表于 08-24 15:41 0次下载
    LSI 3ware <b class='flag-5'>FreeBSD</b> 3DM2和CLI安装程序10.1

    对于FreeBSD Emulex驱动程序用户手册 版本10.2

    电子发烧友网站提供《对于FreeBSD Emulex驱动程序用户手册 版本10.2 .pdf》资料免费下载
    发表于 08-24 11:44 0次下载
    对于<b class='flag-5'>FreeBSD</b> Emulex驱动程序用户手册 版本10.2

    10.2.1/9.5.4 dm2 CLI FreeBSD代码集

    电子发烧友网站提供《10.2.1/9.5.4 dm2 CLI FreeBSD代码集.zip》资料免费下载
    发表于 08-24 10:21 0次下载
    10.2.1/9.5.4 dm2 CLI <b class='flag-5'>FreeBSD</b>代码集

    Emulex FreeBSD驱动程序用户手册版本10.6

    电子发烧友网站提供《Emulex FreeBSD驱动程序用户手册版本10.6.pdf》资料免费下载
    发表于 08-21 11:20 0次下载
    Emulex <b class='flag-5'>FreeBSD</b>驱动程序用户手册版本10.6

    CLI FreeBSD——10.2.1/9.5.4代码集

    电子发烧友网站提供《CLI FreeBSD——10.2.1/9.5.4代码集.zip》资料免费下载
    发表于 08-21 11:06 0次下载
    CLI <b class='flag-5'>FreeBSD</b>——10.2.1/9.5.4代码集

    CLI FreeBSD——10.2代码集

    电子发烧友网站提供《CLI FreeBSD——10.2代码集.zip》资料免费下载
    发表于 08-18 10:17 0次下载
    CLI <b class='flag-5'>FreeBSD</b>——10.2代码集

    3 dm2 CLI的FreeBSD 10.2.2.1/9.5.5.1代码集8 xxx/95 xx/96xx/97 xx

    电子发烧友网站提供《3 dm2 CLI的FreeBSD 10.2.2.1/9.5.5.1代码集8 xxx/95 xx/96xx/97 xx.zip》资料免费下载
    发表于 08-14 14:29 0次下载
    3 dm2 CLI的<b class='flag-5'>FreeBSD</b> 10.2.2.1/9.5.5.1代码集8 xxx/95 xx/96xx/97 xx

    FreeBSD以太网驱动程序版本说明 版本10.2.275.0

    电子发烧友网站提供《FreeBSD以太网驱动程序版本说明 版本10.2.275.0.pdf》资料免费下载
    发表于 08-14 10:19 0次下载
    <b class='flag-5'>FreeBSD</b>以太网驱动程序版本说明 版本10.2.275.0

    CLI FreeBSD-10.1代码集

    电子发烧友网站提供《CLI FreeBSD-10.1代码集.zip》资料免费下载
    发表于 08-11 10:43 0次下载
    CLI <b class='flag-5'>FreeBSD</b>-10.1代码集

    stm32h750既要实现主机,也要实现从机功能要怎么操作?

    STM32_USB_Device_Library和STM32_USB_Host_Library。请问下,H750既要实现主机,也要实现从机功能,要怎么实现呢?有什么资料可以参考下吗?
    发表于 08-08 08:10

    CLI FreeBSD——从10.2.2.1/9.5.5.1代码集

    电子发烧友网站提供《CLI FreeBSD——从10.2.2.1/9.5.5.1代码集.zip》资料免费下载
    发表于 07-28 14:55 0次下载
    CLI <b class='flag-5'>FreeBSD</b>——从10.2.2.1/9.5.5.1代码集

    连你也要学PLC,也太卷了吧##工业自动 #plc #编程 #电工 #非标自动#硬声创作季

    plc电机驱动自动
    也许吧
    发布于 :2023年07月28日 10:29:44