Announcement

Collapse
No announcement yet.

Rust For Linux Kernel v9 Patches Trim Things Down Greatly For Easier Upstreaming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rust For Linux Kernel v9 Patches Trim Things Down Greatly For Easier Upstreaming

    Phoronix: Rust For Linux Kernel v9 Patches Trim Things Down Greatly For Easier Upstreaming

    Earlier this week saw the Rust for Linux v8 patches posted that introduced a number of new abstractions and expanding the Rust programming language integration to more areas of the kernel. Those patches amounted to 43.6k lines of new code while "Rust for Linux v9" was posted today and comes in at just 12.5k lines of new code...

    https://www.phoronix.com/news/Rust-For-Linux-v9-Patches

  • #2
    Wouldn't be smarter to just finish rust kernel support first and then merge it to mainline than stripping it to minimal version making rust basically useless until some future merges?

    Comment


    • #3
      Originally posted by polluktus View Post
      Wouldn't be smarter to just finish rust kernel support first and then merge it to mainline than stripping it to minimal version making rust basically useless until some future merges?
      That's generally how Rust Lang development works. You ship a feature as a MVP, and then expand on it later based on user feedback rather than trying to create a complete product by guessing what people actually want.

      Comment


      • #4
        Originally posted by polluktus View Post
        than stripping it to minimal version making rust basically useless until some future merges?
        I don't think anyone truly thought that a full fat Rust support was ever going to enter the kernel (and certainly not standard library, cargo, crates.io)

        Possibly why C++ struggled in Linux kernel space is because after stripping it down to the core useful parts, you are more or less back at C again. Rust will likely be no different.

        Comment


        • #5
          Originally posted by kpedersen View Post
          I don't think anyone truly thought that a full fat Rust support was ever going to enter the kernel (and certainly not standard library, cargo, crates.io)

          Possibly why C++ struggled in Linux kernel space is because after stripping it down to the core useful parts, you are more or less back at C again. Rust will likely be no different.
          C++ struggled in the Linux kernel because Linus wanted no part of it. Rust is different in that regard.

          Comment


          • #6
            The reason why this is done can be read here: https://lkml.org/lkml/2022/8/2/462

            The rest will follow. No one think the rest is bad, just too large to have time to review it this merge
            window. Also so that different subsystem owners can review individual patches
            Last edited by dlq84; 05 August 2022, 04:07 PM.

            Comment


            • #7
              Adding C++ is much easier than adding Rust and could be done decade ago. The current kernel heavily relies on GCC extensions (so it's not the standard C) and crazy stuff like:
              Code:
              #define __is_constexpr(x) \
              (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

              Comment


              • #8
                Originally posted by polluktus View Post
                Wouldn't be smarter to just finish rust kernel support first and then merge it to mainline than stripping it to minimal version making rust basically useless until some future merges?
                Dunno, but maybe smaller pieces will attract more people to review the stuff.

                Comment


                • #9
                  Originally posted by jacob View Post

                  C++ struggled in the Linux kernel because Linus wanted no part of it. Rust is different in that regard.
                  Indeed. Rust would have failed very hard back then. But now Linus has commercial companies to keep happy.

                  Comment


                  • #10
                    Originally posted by kpedersen View Post
                    I don't think anyone truly thought that a full fat Rust support was ever going to enter the kernel (and certainly not standard library, cargo, crates.io)
                    Many people here believe that because they didn't read the articles. That was clear from the comments.

                    Possibly why C++ struggled in Linux kernel space is because after stripping it down to the core useful parts, you are more or less back at C again. Rust will likely be no different.
                    Isn't the experimental implementation of Rust in the kernel that we are discussing here basically Rust reduced to its core and still useful? As you mentioned it doesn't has standard library nor cargo, but the pure language which is way more expressive than C and safe by default. It may still be a failed experiment but that was the main point, it still is safer than C.

                    Comment

                    Working...
                    X