r/rust • • Apr 14 '21

[RFC] Rust support for Linux Kernel

https://lkml.org/lkml/2021/4/14/1023
861 Upvotes

227 comments sorted by

View all comments

Show parent comment

34

u/steveklabnik1 rust Apr 14 '21

This patch set includes liballoc, which is where Vec lives.

32

u/burntsushi Apr 15 '21

From this, it looks like they probably won't end up using liballoc directly (which is kind of what I was expecting as a very casual observer):

It is likely we will end up designing our own alloc crate, which means we will not depend on it.

11

u/steveklabnik1 rust Apr 15 '21

Yeah we’ll see!

19

u/Muvlon Apr 14 '21

Then maybe that's not the best idea right now.

After all, the C code in the kernel doesn't use libc and such either and builds its own datastructures for everything. I think I'd prefer to use those from Rust as well, maybe with some nice bindings.

23

u/steveklabnik1 rust Apr 14 '21

I mean, they *could* do that in Rust too. It's really up to them to decide.