Announcement

Collapse
No announcement yet.

Latest Patches Sent Out For Adding Rust Support To The Linux Kernel

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

  • Latest Patches Sent Out For Adding Rust Support To The Linux Kernel

    Phoronix: Latest Patches Sent Out For Adding Rust Support To The Linux Kernel

    This US Independence Day a revised set of patches were mailed out providing support for Rust as a secondary programming language within the Linux kernel for areas where increased security and memory safety are of utmost importance. The set of 17 patches plumb the Linux kernel with initial support, an example driver, and in total amount to more than 33k lines of new code in its early form...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I'll get me popcorn.

    Comment


    • #3
      Go! Go! Go!

      (That's me cheering for Rust, not an ad for Go.)

      Comment


      • #4
        an initial user of the Rust support is an Android

        Comment


        • #5
          So we don't use O3 optimizations because it's considered not reliable enough. But we'll depend on nightly builds of a new compiler and add 33k LoC just to squash the heap manager in. I can't wait..

          Comment


          • #6
            Originally posted by ferry View Post
            So we don't use O3 optimizations because it's considered not reliable enough. But we'll depend on nightly builds of a new compiler and add 33k LoC just to squash the heap manager in. I can't wait..
            It's one of the first commits. Nobody even requested it be mainlined in its current form.

            Imho it's ok to use stuff that's currently experimental, it sends a message about what should be stabilized next.
            As for alloc, it's right there in the article: some changes to the current crate were needed and the changes are not upstreamed yet.

            Comment


            • #7
              Originally posted by bug77 View Post

              It's one of the first commits. Nobody even requested it be mainlined in its current form.

              Imho it's ok to use stuff that's currently experimental, it sends a message about what should be stabilized next.
              As for alloc, it's right there in the article: some changes to the current crate were needed and the changes are not upstreamed yet.
              Rust haters always gonna hate.

              Comment


              • #8
                Originally posted by ferry View Post
                So we don't use O3 optimizations because it's considered not reliable enough. But we'll depend on nightly builds of a new compiler and add 33k LoC just to squash the heap manager in. I can't wait..
                I think most people would consider improved security and stability more important than -O3, but that's not the whole story. It has been explained here and elsewhere many times already, but apparently still not enough: Rust's ability to guarantee certain invariants eventually allows the compiler to perform some optimisations that inherently can't be done reliably in C. In the great scheme of things, using Rust is a step towards more aggressive optimisation, not away from it.

                To be fair, in practice it's a distant future, because at the moment we are talking about using Rust for new developments, not to rewrite existing parts of the kernel, and also because Rust is still being held back by the shortcomings of LLVM's pointer aliasing support which was basically only designed for C.

                Comment


                • #9
                  Another change with these new patches is that prior rounds required using nightly releases of the Rust compiler while now the kernel can be compiled with beta and stable rustc releases. However, the kernel support does require some Rust compiler features currently treates as unstable by upstream.
                  Let me guess. They're following Firefox's lead in abusing the environment variable for building rustc itself which grants stable/beta-channel access to unstable language features which are only supposed to be accessible on nightly channel.

                  Comment


                  • #10
                    Originally posted by ssokolow View Post

                    Let me guess. They're following Firefox's lead in abusing the environment variable for building rustc itself which grants stable/beta-channel access to unstable language features which are only supposed to be accessible on nightly channel.
                    There is a typo.

                    Comment

                    Working...
                    X