Re: Rust kernel policy
From: Dave Airlie
Date: Wed Feb 19 2025 - 01:00:00 EST
On Wed, 19 Feb 2025 at 11:00, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>
> On 2/18/25 14:54, Miguel Ojeda wrote:
> > On Tue, Feb 18, 2025 at 10:49 PM H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> >>
> >> I have a few issues with Rust in the kernel:
> >>
> >> 1. It seems to be held to a *completely* different and much lower standard than the C code as far as stability. For C code we typically require that it can compile with a 10-year-old version of gcc, but from what I have seen there have been cases where Rust level code required not the latest bleeding edge compiler, not even a release version.
> >
> > Our minimum version is 1.78.0, as you can check in the documentation.
> > That is a very much released version of Rust, last May. This Thursday
> > Rust 1.85.0 will be released.
> >
> > You can already build the kernel with the toolchains provided by some
> > distributions, too.
> >
>
> So at this point Rust-only kernel code (other than experimental/staging)
> should be deferred to 2034 -- or later if the distributions not included
> in the "same" are considered important -- if Rust is being held to the
> same standard as C.
Rust is currently planned for non-core kernel things first, binder,
drivers, maybe a filesystem,
There will be production kernel drivers for new hardware shipping in
the next few years, not 2034 that will require rust to work.
Now if you are talking about core kernel code I don't believe anyone
has suggested any core piece of the kernel to be written in rust yet,
when someone does that we can make more informed decisions on how to
move forward with that code at that time, but otherwise this is just a
theoretical badly made argument.
Dave.