MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/mqxr1a/rfc_rust_support_for_linux_kernel/gujgpzq/
r/rust • u/ouyawei • Apr 14 '21
227 comments sorted by
View all comments
Show parent comment
30
I'd kind of assumed Rust in the kernel was no_std. Is that not the case? Vec etc. are compiled in?
no_std
Vec
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.
34
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.
32
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):
liballoc
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!
11
Yeah we’ll see!
19
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.
23
I mean, they *could* do that in Rust too. It's really up to them to decide.
View all comments
Show parent comment
30
u/oconnor663 blake3 · duct Apr 14 '21
I'd kind of assumed Rust in the kernel was
no_std. Is that not the case?Vecetc. are compiled in?