Wouldn't Zig be more suitable than rust? In the Linux kernel
The Zig compiler is compatible with C, Zig code is cleaner than Rust, and they are both equally secure. What do you think? Note: I'm not an expert, it's just what you read in articles on the internet :D
The Zig compiler is compatible with C So is Rust.
Zig code is cleaner than Rust, The standard library is a bit more readable, sure, but the overall 'cleanliness' of either language is up for debate.
and they are both equally secure. If by 'secure' you mean safer, I believe Rust outshines Zig in memory safety.
Again, this is just from my research; I have only ever experimented with Rust so I may be a bit biased. -- - Joshua.
On Mon, Sep 23, 2024 at 5:08 PM Manuel Quintero Fonseca <manuel@uas.edu.mx> wrote:
The Zig compiler is compatible with C, Zig code is cleaner than Rust, and they are both equally secure.
What do you think?
The kernel needs more than Rust's incomplete x86_64 and i686 support. Rust would actually have to have Tier 1 support for armel, armv7, aarch64, loongarch64, mips{64}, powerpc{64}, riscv{64}, sparc{64}, s390x, and a wheelbarrow full of other minor architectures. See <https://doc.rust-lang.org/nightly/rustc/platform-support.html>. Zig would have to provide similar support. I don't believe Rust or Zig would be much help at the moment. Jeff
What do you think?
I'd like to add that sociological and organisational matters are often (and I think here too) more important than technical reasons. If one of the languages has a bigger community (and more importantly more people with the motivation to make it work for linux) that's what will make the difference. From what it looks like to me currently Rust has the better marketing and the bigger community. It could also make a big difference if a company came up that champions one of the languages and wants to write kernel modules with it -- Richard
participants (4)
-
Jeffrey Walton -
Joshua Rose -
Manuel Quintero Fonseca -
Richard