Re: [TECH TOPIC] Rust for Linux

Miguel Ojeda
2021-07-06T21:51:03Z

On Tue, Jul 6, 2021 at 10:47 PM Sasha Levin <sashal@kernel.org> wrote:
>
> I strongly disagree. If we have abstractions for a particular subsystem
> all it means that someone at some point did that work, nothing more than
> that.
>
> That someone might have moved on, working elsewhere, retired, etc, and
> those abstractions are living orphaned in the kernel.

That problem is orthogonal to Rust/C. I already acknowledged that if
you want to refactor Rust code, you will need some bare minimum Rust
knowledge -- there is no way around that, for any language.

And indeed, a second language introduces downsides like this -- this
is also acknowledged in the original RFC.

What I am saying is that, in the beginning (when most kernel
developers are not accustomed to Rust), a solution would be that
subsystem maintainers could step up and help those doing a refactor
that touches their Rust code. We also discussed a bit of this in the
original LKML discussion back in April; and we also offered ourselves
(the Rust support folks) to help as much as we can if anybody is
having issues on the Rust side.

But yes, if Rust usage grows in the kernel, then eventually it would
be much better if most kernel developers have a handle on Rust.

> That's quite an ask. If the driver work goes in and I want to touch the
> driver API, I need to get Greg KH to write code for me?

I have not said that, and that obviously that does not scale. I am
just stating what I think could help everyone during the transition
period, assuming we share a common goal and accept Rust into the
kernel.

Cheers,
Miguel