Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have no idea what I'm talking about, but rust can also be introduced gradually, and async isn't a language feature the kernel will use, actually the kernel will probably not even use the standard library because of how rust assumes it'll never run out of RAM.


> and async isn't a language feature the kernel will use

Why not thought? Lots of drivers could benefit from async to simplify their state machine as they wait for interrupt for example.


One could try to use it for those use-cases, but it probably warrants some investigation if it's actually the best possible solution for the problem.

The kernel has some different properties than userspace - e.g. context switches between kernel threads can already be cheap, which minimizes some of the reasons for using async/await. Then allocations for continuations using in-kernel slab allocators might also be cheaper then in userspace, whereas placing huge objects (Future)s on the stack (preferred mode of Rust Future composition) might be more expensive with tiny kernel stacks.

I guess it might be worth to do experiments for some use-cases to see how it actually would work out.


Async is very good for only a specific kind of of state machine graph that isn't nearly as prevalent outside of network services.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: