The topic of the Rust experiment was just discussed at the annual Maintainers Summit. The consensus among the assembled developers is that Rust in the kernel is no longer experimental — it is now a core part of the kernel and is here to stay. So the “experimental” tag will be coming off. Congratulations are in order for all of the Rust for Linux team.

    • HaraldvonBlauzahn@feddit.orgOP
      link
      fedilink
      arrow-up
      2
      ·
      3 months ago

      I guess that still depends on the maintainer which is responsible. But since drivers often deal with untrusted data, which can lead to security exploits, this makes a lot of sense.

  • Buffalox@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    I would have guessed that mixing different programming languages would cause problems. But apparently it’s working well.
    It’s been 20 years since I did any serious programming, so I’m a bit rusty, is that what Rust is for?

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      Lots of “modern” languages don’t interop terribly well with other languages, because they need a runtime environment to be executed.
      So, if you want to call a Python function from Java, you need to start a Python runtime and somehow pass the arguments and the result back and forth (e.g. via CLI or network communication).

      C, C++, Rust and a few other languages don’t need a runtime environment, because they get compiled down to machine code directly.
      As such, you can call functions written in them directly, from virtually any programming language. You just need to agree how the data is laid out in memory. Well, and the general agreement for that memory layout is the C ABI. Basically, C has stayed the same for long enough that everyone just uses its native memory layout for interoperability.

      And yeah, the Rust designers weren’t dumb, so they made sure that Rust can also use this C ABI pretty seamlessly. As such, you can call Rust-functions from C and C-functions from Rust, with just a bit of boilerplate in between.
      This has also been battle-tested quite well already, as Mozilla used this to rewrite larger chunks of Firefox, where you have C++ using its C capabilities to talk to Rust and vice versa.

    • HiddenLayer555@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      Pff you know how many layers of abstraction HolyC still has? Real computing enthusiasts write their OS in machine code. Not assembly, that’s an abstraction too, literally tapping out high and low electrical pulses like you’re in the Marconi room on the Titanic.

    • Anafabula@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      No. The Rust code in the kernel is GPLv2 just like the rest of the kernel. The licence of the compiler has nothing to do with that, that’s nonsense Rust haters make up.

      You can argue against independent projects like the Rust coreutils not using a copyleft license, but that has nothing to do with Rust or the kernel. There are independent C projects without non-copyleft licenses too.

      • LeFantome@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        3 months ago

        Ah thank you. You likely guessed the reason for the question.

        Many popular projects written in Rust, including the UUtils core utils rewrite, are MIT licensed as Rust is. There have been people that purposely confuse things by saying that “the Rust community” is undermining the GPL. I can see how that may lead somebody to believe that there is some kind of inherent licence problem with code written in Rust.

        Code written in Rust can of course be licensed however you want from AGPL to fully proprietary.

        I personally perceive a shift in license popularity towards more permissive licenses at least with the “younger generation”. The fact that so many Rust projects are permissively licensed is just a consequence of those kinds of licenses being more popular with the kinds of “modern” programmers that would choose Rust as a language to begin with. Those programmers would choose the same licenses even they used the GCC toolchain. But the “modern” languages they have to choose from are things like Rust, Swift, Zig, Go, or Gleam (all permissively licensed ). Python and TypeScript are also still trendy (also permissively licensed).

        Looking at that list, it is pretty silly to focus on Rust’s license. Most of the popular programming languages released over the past 20 years are permissively licensed.

        • Muehe@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          3 months ago

          Many popular projects written in Rust, including the UUtils core utils rewrite, are MIT licensed as Rust is. There have been people that purposely confuse things by saying that “the Rust community” is undermining the GPL.

          How would that ever be a problem in any case? I mean I’m not that versed in licensing stuff, but MIT explicitly allows sublicensing, so if in doubt just slap a GPL-sticker on the MIT code and you are good, no?