|
|
Subscribe / Log in / New account

A first look at Rust in the 6.1 kernel

A first look at Rust in the 6.1 kernel

Posted Oct 13, 2022 22:17 UTC (Thu) by gray_-_wolf (subscriber, #131074)
Parent article: A first look at Rust in the 6.1 kernel

I'm curious about the stability of rust's toolchain for kernel development. Does what has been merged still use unstable features? Or can you actually compile on stable rust 1.62.0? If no, are there any plans on how will the rust version support looks like? 1.62.0 forever? Or on other side of something like only latest and latest - 1?


to post comments

A first look at Rust in the 6.1 kernel

Posted Oct 13, 2022 23:06 UTC (Thu) by tialaramex (subscriber, #21167) [Link] (1 responses)

Yes, Rust for Linux needs some unstable features. Rust for Linux tracks what is needed, since it is their long term goal that this will become unnecessary: https://github.com/Rust-for-Linux/linux/issues/2

Note that - while this is not a supported configuration - the stable Rust compiler is technically quite capable of compiling code using the unstable features which existed when it shipped, as this is exactly how it builds itself and its standard library both of which of course use unstable features. So in principle Rust for Linux could advise builders to use the stable Rust compiler, but just tell it to pretend it isn't a stable Rust compiler (one environment variable change), so as to take advantage of any QA benefits as presumably your distribution's stable Rust 1.62 compiler was actually tested while some random nightly (which has unstable features since it wasn't supported anyway) is not tested.

A first look at Rust in the 6.1 kernel

Posted Oct 13, 2022 23:55 UTC (Thu) by Gaelan (guest, #145108) [Link]

> So in principle Rust for Linux could advise builders to use the stable Rust compiler, but just tell it to pretend it isn't a stable Rust compiler (one environment variable change), so as to take advantage of any QA benefits as presumably your distribution's stable Rust 1.62 compiler was actually tested while some random nightly (which has unstable features since it wasn't supported anyway) is not tested.

This is exactly what's being done.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds