Re: Linux kernel in-tree Rust support

From: Eric W. Biederman
Date: Mon Jul 13 2020 - 14:14:09 EST


Nick Desaulniers <ndesaulniers@xxxxxxxxxx> writes:

> Hello folks,
> I'm working on putting together an LLVM "Micro Conference" for the
> upcoming Linux Plumbers Conf
> (https://www.linuxplumbersconf.org/event/7/page/47-attend). It's not
> solidified yet, but I would really like to run a session on support
> for Rust "in tree." I suspect we could cover technical aspects of
> what that might look like (I have a prototype of that, was trivial to
> wire up KBuild support), but also a larger question of "should we do
> this?" or "how might we place limits on where this can be used?"
>
> Question to folks explicitly in To:, are you planning on attending plumbers?
>
> If so, would this be an interesting topic that you'd participate in?

I have two big concerns about actually using rust.

1) How large is the rust language support, and will each rust module
need to duplicate it. I seem to remember someone mentioning it is
noticable in size.

2) What is rust usable for? The rust type system will not admit
doubly linked lists (or anything where two pointers point at the
same memory) unless you are using an unsafe block.

Now maybe all of that can be wrapped up in libraries written in
C that Rust can just call, so rust might be useful for building
drivers.

What I am certain of is that in the core kernel where I tend to spend
my time not being able to use doubly linked lists looks like a
non-starter.

Eric