5 ms·
Doing this well requires a heavy enough runtime that it would disqualify it for this kind of work. Not on a technical level, but on a social one. While there ha
by steveklabnik 6y ago
Doing this well requires a heavy enough runtime that it would disqualify it for this kind of work. Not on a technical level, but on a social one. While there have been operating systems created with this sort of runtime, they're not as well known or successful as ones that haven't. I would imagine this email would be a flat "no" if this were a core part of Rust, sadly.
- acomjean 6y agoFrom what I remember the Linux kernel doesn’t even use std.lib. It’s pretty straight up C with no dependencies (the os being low level). Makes kernel module programming difficult.
- SubjectToChange 6y agoThe Linux kernel is freestanding. But that's hardly the reason why kernel programming is difficult.
- staticassertion 6y ago> a heavy enough runtime Hey, asking out of pure ignorance - Why do you think this? My naive point of view is that the Linux kernel already has enough of a runtime to support such at hing - a scheduler, kernel threads, and interrupts. An actor system shouldn't be particularly heavy - you can probably implement an actor in just a couple of bytes. Agreed that it couldn't be a core part of Rust though. Maybe it's too off topic or whatever, just curious.
- steveklabnik 6y agoErlang makes heavy use of green threads to do this kind of work. You spin up thousands or hundreds of thousands of these. Kernel threads are too heavy weight to do so. And making them lighter weight has tradeoffs too. Erlang makes use of a GC and immutability to make tasks more restart-able; maybe Rust's memory safety features would let you do this sorta kinda, but I don't think it's been really demonstrated fully yet. Like sure, you could build out some of these features, but they only truly work really well if you extremely commit to the architecture, in my opinion. And the kernel isn't about to do that.
- staticassertion 6y agoOh yeah, I 100% do not believe this would be something that ships to the kernel :)
- myrrlyn 6y agoputting my marker on 2030 as implementing a tokio runtime in kernelspace