Hacker News new | past | comments | ask | show | jobs | submit login

My point is really that rust allows you to build those abstractions, regardless of that specific one.

Sure, the kernel has reusable things like its embedded linked list etc, but they're not type-safe, and they can't represent ownership.

With rust's type-system, a generic rc-like thing could be created which is suitable for the world of the kernel, even if it's not the stdlib Rc.




You can't have RC until you have setup a heap. The stack is not a safe place to put these things.

Without any memory management, things get hard fast, especially considering you still need to parse the memory layout to find out which parts of memory are even usable.


The original comment was "Rc<T> in rust is much easier to use without screwing up than the manually handled reference counters littered throughout the kernel."

That's heap vs. heap. It comes after the very brief stage you're mentioning.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: