- safety is not binary. Some security guarantee are still better than none. (And most security guarantees of Rust still holds in the kernel)
- Rust is at this moment more mature and stable than Zig or Nim with a more broad ecosystem. I don't know much about Ada but I think there are some technical issues there.
Nim's very GC-oriented which just isn't great/usable for the kernel. Yes, you can turn it off and allocate/deallocate manually, but then you barely gain anything on top of C apart from an oop system.
Zig isn't improving correctness too much either. It provides some niceties, but no guarantees around correctness if I understand correctly. It's not trivial - here's a whole post about it https://www.scattered-thoughts.net/writing/how-safe-is-zig/
My understanding is that nim's arc memory management strategy inserts frees where it can automatically without being a GC, and that rust actually does something similar in many cases. Nim's arc doesn't handle cycles, and there is a more GC-like orc strategy. Even using only arc (and refraining from cyclic data structures or handling those specially) still seems better than "barely ... anything on top of C apart from an oop system".
varajelle|3 years ago
- Rust is at this moment more mature and stable than Zig or Nim with a more broad ecosystem. I don't know much about Ada but I think there are some technical issues there.
mlindner|3 years ago
Rust's security guarantees can hold in Rust code that's written for the kernel though. I'm not sure where you got the idea that they can't hold.
Nim has a GC, so that's completely out from being used in the kernel and Zig doesn't offer any security benefits that aren't just slow runtime checks.
brundolf|3 years ago
I'm not sure what you're referring to?
xet7|3 years ago
https://news.ycombinator.com/item?id=33056077
https://lkml.org/lkml/2022/9/19/1105
viraptor|3 years ago
Zig isn't improving correctness too much either. It provides some niceties, but no guarantees around correctness if I understand correctly. It's not trivial - here's a whole post about it https://www.scattered-thoughts.net/writing/how-safe-is-zig/
firesloth|3 years ago
timeon|3 years ago