Following the R4L debacle “you are cancer, you are the problem, we are the thin blue line”, another maintainer steps down from the Linux Kernel

  • some_random_nick@lemmy.world
    link
    fedilink
    arrow-up
    6
    arrow-down
    5
    ·
    5 days ago

    Is there any write-up for the recent events around the kernel and Rust? Glancing over recent posts, it seems like new devs want to push Rust, but older maintainers don’t want to deal with it. Why do people love Rust so much? Is it just a loud minority or does it in fact offer substancial gains and safety over existing C code? Lqstly, can they simply fork the kernel and try their own thing? E.g. do a branch as a proof of concept and therefore convince them to migrate?

    • esa
      link
      fedilink
      arrow-up
      9
      ·
      5 days ago

      Rust is already in the kernel and Torvalds wants more, faster. He’s being obstructed by C purists, who at this point are the people who should fork the kernel if they see anything but C as heresy.

    • trevor@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      19
      arrow-down
      1
      ·
      edit-2
      5 days ago

      can they simply fork?

      Forking the Linux kernel will effectively guarantee that no one will run their software. None, but the most niche distros would ship it. If the Rust people are forced to fork, their time may be better spent contributing to Redox.

      Why do people love Rust so much?

      Rust makes it very difficult (but not impossible) to write dangerous code, whereas C pretty much guarantees you’ll write something dangerous (and therefore insecure or buggy) at some point, especially in larger codebases, like the Linux kernel. Arrogant devs will defend keeping Rust out of the kernel by saying things like “write better code”, but if the people writing kernel code for 20 years are still writing dangerously flawed code, it’s safe to say that at a certain point, we need a better tool. That tool is Rust.

      Rust also has very high-quality libraries that produce nicer finished products. I learned Rust because of clap and ratatui, which make superior CLIs and TUIs to anything else. Seriously, go use a CLI or TUI that was made in Rust. Try bat, a cat clone. You’ll get easy, great command-line completions, easy-to-read help output, optional, beautiful syntax-highlighting, theming, etc. It’s hard for me to go back to vanilla cat.

      And I say all of that as someone that likes C. C is really fun, and it’s a very powerful language, but it was not designed to be memory-safe. If it was, the people complaining about Rust would just complain about C too.

    • KrispeeIguana@lemmy.ml
      link
      fedilink
      arrow-up
      6
      arrow-down
      2
      ·
      5 days ago

      From what I remember, it’s much more difficult to accidentally leak memory in Rust. Combined with the drop-in compatibility with C and the somewhat more intuitive (imo) syntax, I can see its popularity as unsurprising.

      I think the biggest thing is that there aren’t really that many reasons not to use Rust.

      • esa
        link
        fedilink
        arrow-up
        8
        ·
        5 days ago

        Leaking isn’t really the issue, though I suppose Rust helps with that as well. Its memory sales pitch is more about memory safety, which is not reading or writing the wrong parts of memory. Doing that can have all sorts of effects, where the best you can hope for is a crash, but it often results in arbitrary execution vulnerabilities. Memory _un_safety is pretty rare and most prominent in languages like C, C++ and Zig.

        Rust also has more information contained in it, which means resulting programs can actually be faster than C, as the optimizer in the compiler is better informed.