• trevor
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    11 hours ago

    I’m very firmly in the Rust for Linux camp because I am in the “make Linux better” camp, and I don’t see why eventually getting Zig in the kernel would be a problem. If Zig solves problems that C and Rust don’t, by all means, it should be brought in.

    However, one of the primary reasons Rust was chosen is that it is memory-safe by default. Zig, on the other hand, has opt-in safety. So unsafe Zig should probably only go in very specific places where C and Rust can’t do the job. And ideally, there would be some rules that require the usage of safe Zig everywhere else.

    Ignoring Zig, the language, Zig’s compiler toolchain is hands-down, the best I’ve ever seen, and I think introducing Zig to the kernel by making “Zig-built Linux” a thing, would be a really natural way to get that process going.