Announcement

Collapse
No announcement yet.

The Linux Kernel Begins Preparing For Rust 1.78 Upgrade

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

  • The Linux Kernel Begins Preparing For Rust 1.78 Upgrade

    Phoronix: The Linux Kernel Begins Preparing For Rust 1.78 Upgrade

    Following the recent upgrade to Rust 1.77, the Linux kernel Rust code is preparing to move to Rust 1.78 that will be released as stable in about one month...

    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
    Why does Rust needs versioning? What if Linux kernel kept the original code that plumbed initial Rust support and never updated since then? I've been living under a rock. You don't download new version of C++, it has stable ABI and libc implementation.
    Last edited by hax0r; 02 April 2024, 12:06 PM.

    Comment


    • #3
      Originally posted by hax0r View Post
      Why does Rust needs versioning? What if Linux kernel kept the original code that plumbed initial Rust support and never updated since then? I've been living under a rock. You don't download new version of C++, it has stable ABI and libc implementation.
      For the same reasons you have C++11, C++14, C++17, C++20 or C++23.

      Comment


      • #4
        Originally posted by hax0r View Post
        Why does Rust needs versioning? What if Linux kernel kept the original code that plumbed initial Rust support and never updated since then? I've been living under a rock. You don't download new version of C++, it has stable ABI and libc implementation.
        There are 3 different "versions" to speak of.

        One of them is the ABI version you mention, which has no relevance for Linux as it is not being linked with other programs. Also, C++ defines no ABI, C++ implementations define ABIs with varying degrees of stability.

        Then there is the version of language, C++ calls them standards (C++98, C++03, C++11, etc), Rust has editions (2015, 2018, 2021), which is a somewhat different thing. Rust allows backwards compatible language changes within an edition (eg. adding new types, functions, methods), and uses editions for syntactic changes. Herb Sutter's cpp2 is like a new edition of C++.
        ‚Äč
        And there is the version of implementations. The article is about the upgrade of the implementation version. You do it for the faster compile times, the faster binaries, better diagnostics or new (backwards compatible) features. The article mentions several features that are relevant for Linux.

        Comment


        • #5
          Originally posted by bug77 View Post

          For the same reasons you have C++11, C++14, C++17, C++20 or C++23.
          Sure. But that doesn't change every about every month or so?

          Comment


          • #6
            Originally posted by milkylainen View Post

            Sure. But that doesn't change every about every month or so?
            That sounds like Rust versions change almost as fast as PCIe version.

            Comment


            • #7
              Originally posted by milkylainen View Post

              Sure. But that doesn't change every about every month or so?
              C and C++ change fairly often, the year-coded versions are just ratified standards of "the compiler MUST support at least these features". The compilers (ESPECIALLY gcc) add extensions and features to the languages all the time.

              As for Rust, it's simply newer than those languages, and so has a lot more stuff it needs to add/change/ratify each year. Beyond that, the rustc compiler is only one of 2 compilers for the language (the only other being gcc afaik). Other compilers could just as easily choose to lengthen it's support cycles for language versions if they chose to rather than following every update of the rustc compiler and treating it as a language version bump increase.

              Comment


              • #8
                Originally posted by hax0r View Post
                You don't download new version of C++, it has stable ABI and libc implementation.
                C++ had the benefit of copying everything from C, and even then it didn't have a standard for the first 10 years of its existence. That was also 35 years ago.

                Comment


                • #9
                  Originally posted by Daktyl198 View Post
                  As for Rust, it's simply newer than those languages, and so has a lot more stuff it needs to add/change/ratify each year. Beyond that, the rustc compiler is only one of 2 compilers for the language (the only other being gcc afaik). Other compilers could just as easily choose to lengthen it's support cycles for language versions if they chose to rather than following every update of the rustc compiler and treating it as a language version bump increase.
                  The official Rust compiler supports all past versions of the language in the latest releases.

                  Linux is updating Rust so often because not all features used are stable yet. Once all required features are stable, they can move to min required version, like they do for C.

                  Comment


                  • #10
                    Originally posted by milkylainen View Post

                    Sure. But that doesn't change every about every month or so?
                    One reason is that upstream Rust is incorporating improvements that the rust in Linux team are reporting so they can replace some temporary custom solution for a new nightly or stable feature in rust. For example what the article says about removing a forked alloc implementation.

                    They decided to rebase frequently to benefit of this quick evolution. That may change once things are more stable

                    Comment

                    Working...
                    X