3 ms·
Similarly excited about Zig. While its memory safety guarantees may not be as comprehensive as Rust's, I hope we'll one day see Zig in the Linux Kernel. I suspe
by ebening 2y ago
Similarly excited about Zig. While its memory safety guarantees may not be as comprehensive as Rust's, I hope we'll one day see Zig in the Linux Kernel. I suspect the old-time kernel C programmers may have an easier time with Zig than Rust.
- cies 2y agoIIRC the zig compiler compiles C. There is some work being done on making zig compile the Linux kernel (I think someone already succeeded). zig currently uses LLVM but it wants to move away from that: https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_that_zig_wants_to_move_away_from_llvm/ https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_tha... Once zig compiles Linux there are basically 3 compilers that can do so gcc, clang (llvm) and zig (less and less llvm). I expect there to be good tools to port C code to zig (much hard for C->Rust), especially with the advancements in LLMs lately. I would not be surprised if that would result in a zig-linux code base in the coming 5 years. Sure the C based kernel may be the hot bed for innovation for years to come.
- actionfromafar 2y agoQurious: will zig still compile C after it moves off LLVM?
- vulcan01 2y agoYes, but the LLVM integration will be moved to a package so you only need to include it if you want to do that.