Upcoming Rust language features for kernel development - 教程

news/2025/11/14 18:54:37/文章来源:https://www.cnblogs.com/gccbuaa/p/19223100

The Rust for Linux project has been good for Rust, Tyler Mandry, one of the co-leads of Rust's language-design team, said. He gave a talk at Kangrejos 2025 covering upcoming Rust language features and thanking the Rust for Linux developers for helping drive them forward. Afterward, Benno Lossin and Xiangfei Ding went into more detail about their work on the three most important language features for kernel development: field projections, in-place initialization, and arbitrary self types.

Rust 的语言设计团队联合负责人 Tyler Mandry 表示,Rust for Linux 项目对 Rust 本身非常有益。他在 2025 年的 Kangrejos 大会上发表了演讲,介绍了即将推出的 Rust 语言特性,并感谢 Rust for Linux 的开发者们推动这些特性的进展。随后,Benno Lossin 和丁向飞详细介绍了他们在内核编写中最重要的三个语言特性方面的工作:字段投影、就地初始化以及任意 self 类型。

Many people have remarked that the development of new language features in Rust can be quite slow, Mandry said. Partly, that can be attributed to the care the Rust language team takes to avoid enshrining bad designs. But the biggest reason is "alignment in attention". The Rust project is driven by volunteers, which means that if there are not people focusing on pushing a given feature or group of related features forward, they languish. The Rust for Linux project has actually been really helpful for addressing that, Mandry explained, because it is something that a lot of people are excited about, and that focuses effort onto the few specific things that the Linux kernel needs.

Mandry 表示,许多人认为 Rust 新语言特性的开发进展可能相当缓慢。这在一定程度上是因为 Rust 语言团队非常谨慎,避免将糟糕的设计固定下来。但最大原因是“关注的对齐”。Rust 项目由志愿者驱动,这意味着如果没有人专注于推进某个特性或相关特性组,这些特性就会停滞不前。Mandry 解释说,Rust for Linux 项目在这方面十分有帮助,因为这是一个让很多人兴奋的项目,并且把努力集中在 Linux 内核真正需要的少数特性上。

Mandry then went through a whirlwind list of upcoming language features, including types without known size information, reference-counting improvements, user-defined function modifiers of the same kind as const, and more. At the end, he asked which of those were most important to Rust for Linux, and how the assembled kernel developers would prioritize them. Beyond the three features to be discussed later, Lossin said that the project definitely wanted the ability to write functions that can be evaluated at compile time (called const functions in Rust) in trait definitions. Danilo Krummrich asked for specialization, which immediately prompted an "Oh no!" from Lossin, due to the feature's nearly decade-long history of causing problems for Rust's type system. Specialization would allow two overlapping implementations for a single trait to exist, with the compiler picking the more specific one. Matthew Maurer asked for some ability to control what the compiler does on integer overflow.

通过随后,Mandry 敏捷列出了即将推出的语言特性,包括未知大小信息类型、引用计数改进、类似 const 的用户自定义函数修饰符等。最后,他询问这些特性中哪些对 Rust for Linux 最重要,以及在场的内核开发者会如何优先考虑它们。Lossin 表示,除了稍后讨论的三个特性之外,项目确实希望能够在 trait 定义中编写能够在编译时求值的函数(Rust 中称为 const 函数)。Danilo Krummrich 提出了特化(specialization)的需求,这立刻引起了 Lossin 的 “Oh no!” 反应,由于该特性在 Rust 类型环境中几乎有十年的历史问题。特化允许对同一个 trait 存在两个重叠实现,编译器会选择更具体的一个。Matthew Maurer 则希望能够控制编译器在整数溢出时的行为。

Ultimately, Miguel Ojeda told Mandry that the priority should be on stabilizing the unstable language features that Rust for Linux currently uses, followed by language features that would change how the project structures its code, followed by everything else. The next two talks went into much more detail about the current status and future plans for some of those key language features.

最终,Miguel Ojeda 告诉 Mandry,优先级应该是:首先稳定 Rust for Linux 当前使用的不稳定语言特性,其次是那些会改变工程代码结构的语言特性,最后才是其他特性。接下来的两场演讲更详细地介绍了这些关键语言特性的当前状态和未来计划。

Field projections
Field projection refers to the idea of taking a pointer to a structure, and turning it into a pointer to a field of the structure. Rust does already have this for the built-in reference and pointer types, but it can't always be made to work for user-defined smart-pointer types. Since the Rust for Linux developers would like to have custom sm

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/965633.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

详细介绍:Linux网络性能测试利器:iperf3使用指南

详细介绍:Linux网络性能测试利器:iperf3使用指南pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas"…

linux 安装telnet 服务

在 Linux 系统中,telnet 服务通常指的是 telnet 工具,而不是完整的 Telnet 服务(如 telnetd)。如果你想要安装 telnet 工具(用于远程登录),可以使用不同的包管理器来安装。 ✅ 一、安装 telnet 工具(用于远程登…

实用指南:【STM32】RTC实时时钟

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

探索乐泰胶水:性能与适用场景全解析

提起“乐泰胶水”,很多人第一反应是“听说过,但具体能做什么?”。作为汉高旗下的工业胶黏剂头部品牌,乐泰的产品矩阵覆盖从家庭DIY到工业制造的全场景需求。但真正让它在专业领域站稳脚跟的,是其针对电机行业、流…

在 CSharp 中调用 Wolfram Language (Mathematica)

安装 Wolfram Engine (https://www.wolfram.com/engine/) 安装完毕后,按提示注册或登录 找到 <Wolfram dir>\SystemFiles\Links\NETLink 目录 在需要使用 Wolfram 的 CSharp 项目中引用 Wolfram.NETLink.dll …

【System Beats!】第七章 链接

链接 相关定义即将各种代码和数据片段收集并组合成为一个单一文件的过程。 主要任务:符号解析与重定位 目标文件:编译器将源代码文件编译后的产物,但还未加载链接为最后的可执行文件。 可执行文件:链接后的最终产物…

oracle 11g r2 linux

你提到的 "Oracle 11g R2 Linux" 是 Oracle 数据库的一个版本,主要用于 Linux 系统。以下是一些与 Oracle 11g R2 在 Linux 上相关的关键信息和命令示例,帮助你了解如何在 Linux 环境中安装、配置和管理 O…

实用指南:接口测试 | 使用Postman实际场景化测试

实用指南:接口测试 | 使用Postman实际场景化测试2025-11-14 18:35 tlnshuju 阅读(0) 评论(0) 收藏 举报pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; displa…

应用程序建立的数据库连接,也就是非交互式连接 是什么时候开始的?什么时候结束?连接结束后 会影响应用程序操作db失败吗? 还有就是如果连接关闭了 会立马重新建立新的连接吗?

问题: 应用程序建立的数据库连接,也就是非交互式连接 是什么时候开始的?什么时候结束?连接结束后 会影响应用程序操作db失败吗? 还有就是如果连接关闭了 会立马重新建立新的连接吗?解答: 我们讨论的是应用程序通…

2025高压合金管实力厂家推荐榜:5310/6479 高压合金管型号领衔,天津大无缝联合钢铁有限公司五星领跑工业用材赛道

在工业生产、能源输送等场景中,合金管、高压合金管的品质直接影响设备运行稳定性,5310 高压合金管与 6479 高压合金管更是核心刚需产品。2025 年榜单聚焦产品性能、技术实力与应用适配性,精选 4 家优质企业,为采购…

Kafka协调器:消费者组管理与重平衡机制 - 指南

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

#题解#洛谷P1884#二维离散化#

传送门 分析x,y的范围-1e8~1e8,需要离散化。定义f[i][j]是左上角(ci,cj)右下角(c(i+1),c(j+1))染色情况代码实现 #include<bits/stdc++.h> using namespace std; #define MAXN 4010 int n, btop, ctop; int…

HarmonyOS应用配置文件与资源组织深度解析 - 教程

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

2025扫描电镜精选榜:富泰微五星领衔,日立、国仪携超高分辨率/钨灯丝 SEM,适配科研工业多元需求

随着纳米科技与材料科学的发展,扫描电镜(SEM)已成为微观表征核心设备,涵盖进口与国产、钨灯丝与场发射、FIB 与超高分辨率等多元类型。2025 年榜单聚焦技术实力与用户口碑,精选 3 家优质企业,为不同场景提供精准…

2025济南单招综评培训机构排行榜:3 家实力学校口碑出圈 易升教育五星优选 解锁适配不同考生的升学备考靠谱路径

随着单招综评成为多元升学的重要路径,济南单招综评培训市场愈发成熟。本文结合办学资质、师资实力、升学成果及口碑反馈,精选 3 家优质济南单招综评机构,其中济南易升教育学校以全维度优势获评五星推荐,为考生提供…

2025山东公考面试/笔试/考试/辅导培训五星推荐榜:三家优质机构精准适配备考需求,助力高效上岸

2025年公考竞争持续升温,优质的公考培训、公考面试培训、公考笔试培训成为考生高效备考的关键。本次推荐榜聚焦口碑与实效,精选 3 家五星公考辅导机构,为不同基础、不同场景的考生提供靠谱参考。 山东邦荣公考【推荐…

2025智能科技/医疗设备/信息科技/新中式茶饮/科创/平面/东方美学/品牌设计/品牌logo设计/品牌VI设计领域优质公司排行榜:聚焦全案创意与视觉赋能,3 家机构助力品牌高效破圈

在商业竞争日趋激烈的当下,品牌设计成为企业构建差异化优势、精准触达受众的核心抓手。品牌全案设计、品牌 VI 设计、品牌 logo 设计等服务,既塑造品牌外在辨识度,更传递核心价值,驱动商业影响力升级。2025 年,一…

2025修护/二硫化硒去屑/香氛/控油蓬松/洗发水品牌推荐榜:精准护养新选择,MASIL玛丝兰领衔解决头屑、扁塌等护发难题

随着生活节奏加快,头皮出油、头屑反复、发丝干枯等问题愈发常见,一款适配自身发质的洗发水成为日常护理的刚需。经过市场口碑筛选与成分功效验证,2025年值得关注的洗发水品牌榜单新鲜出炉,其中既有深耕护发领域的实…

2025防火/模压/瓦楞/大跨距/热镀锌/热浸锌/不锈钢/光伏/铝合金/锌铝镁电缆桥架优选榜:河北百著全系列防护覆盖 三家实力厂家凭场景优势突围

随着工业建设与新能源产业的快速发展,电缆桥架作为电力传输核心配套设备,其品质与场景适配性备受关注。2025 年榜单聚焦产品多样性、技术实力与工程口碑,精选三家优质企业,其中河北百著金属制品有限公司以全系列布…

2025厨房/无烟管/商用/复合式/内循环/小型/油烟净化/一体机推荐榜:上海多环五星领跑 全场景适配解锁餐饮 / 家用净化新体验

2025年油烟净化需求向 “高效合规、场景细分、节能智能” 升级,油烟净化一体机成为商用与家用市场主流。上海多环领衔三大实力企业,以核心技术与全场景适配能力,为厨房、餐饮等场景提供优质解决方案。 上海多环油烟…