Announcement

Collapse
No announcement yet.

The Latest Progress On Rust For The Linux Kernel

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

  • #11
    I think this will make linux worse, not better.

    Comment


    • #12
      The accepting of Rust in the kernel makes zero sense to me, the kernel is something like 25 million lines of C code, even in a extremely 'optimistic' scenario, I don't see the kernel becoming more than 10% Rust.

      So what you get is more complexity both from a build and more importantly, maintenance standpoint.

      The Linux subsystem maintainers are all expert C programmers who will now have to become Rust experts in order to be effective in accepting or rejecting Rust code contributions, this is a lot of overhead added to the kernel just to have a very small amount of the kernel be potentially rewritten in a safer language.

      To me this seems like something that is being pushed on to the Linux kernel rather than something the kernel devs want, and seeing Linus bend to this is kind of disheartening.

      Comment


      • #13
        Originally posted by Soul_keeper View Post
        I think this will make linux worse, not better.
        The Linux maintainers seem to disagree with you.

        Comment


        • #14
          Originally posted by bachchain View Post

          The Linux maintainers seem to disagree with you.
          Do they? Looks like they want to see some real drivers first, before deciding if the entire ordeal is actually worth it. I'm pretty sure that's also what Linus wrote, but I cba finding more sources.

          Not sure if this is just a state of the union post or if you actually want to submit it. If the later I strongly disagree with merging it, as you should refined it and prove it actually is useful first. Where useful would be a real-life driver like say nvme or a usb host controller driver that actually works and shows benefits over the existing one. Until it shows such usefulness it will just drag everyone else down.
          Source

          Please work on a real driver to help prove, or disprove, that this all is going to be able to work properly. There are huge unanswered questions that need to be resolved that you will run into when you do such a thing. Good luck!
          Source

          Comment


          • #15
            Originally posted by bachchain View Post

            The Linux maintainers seem to disagree with you.
            Really ? Have the actual Linux maintainers requested Rust support in the kernel ? From what I've seen this push seem to be spearheaded by Google.

            Comment


            • #16
              Originally posted by darkoverlordofdata View Post
              I’m trying to learn rust. It’s challenging. It also challenges my hardware, which is the main reason I’m not pursuing it. When I get past hello world and into a more realistic project, I start having problems compiling – running out of memory it slows to a crawl and the cpu gets pretty overloaded. It either crashes or it takes an hour or so to compile. Sure, I need to upgrade. Can I afford it? No. I don’t have this issue with clang, so I’ll stick to c.

              My question is how many other’s experience this, and will this slow down rust contributions?
              One of the hazards of the Rust ecosystem is dependencies that are too liberal with the stuff that's slow to compile in any language, such as overuse of generics and procedural macros.

              I run an old AMD Athlon II X2 270 and compilation is slow compared to something like C, but not prohibitively so as long as I'm not playing metaprogramming YOLO with my dependencies. As for RAM, how much do you have?

              Comment


              • #17
                Originally posted by Grinch View Post
                Have the actual Linux maintainers requested Rust support in the kernel?
                Not explicitly, as far as I know. But if there were any real objections, I imagine Linus "COMPLETE AND UTTER GARBAGE" Torvalds probably would've made them clear by now.


                Originally posted by Grinch View Post
                From what I've seen this push seem to be spearheaded by Google.
                So? History has shown that the kernel devs are perfectly capable of saying no to Google.

                Comment


                • #18
                  Originally posted by dragonn View Post

                  Yes, writing programs in Rust takes a longer time when you only count the how much time you spend on writing the code. But when you account for all test, getting all bugs out etc. the whole picture can change dramatically.
                  I don't know if there is any data to support the idea that the whole picture would change. It's also totally besides the point. Rust imposes a much higher upfront cost than C and possibly even than C++, but so what? Rust has never been about some kind of agile development. If you want cheap code, don't use Rust. If you care about so-called "productivity", Rust is a very poor fit. But when you need code that is bulletproof (and yes, of course, long and expensive to develop), then Rust is your ideal choice. I'd say that a kernel is one of the cases when this applies.

                  Comment


                  • #19
                    Rust code is hardly bulletproof. Just look at the CVE list for software written in Rust.
                    Last edited by linner; 11 September 2021, 11:46 PM. Reason: Add CVE URL

                    Comment


                    • #20
                      Originally posted by jacob View Post
                      But when you need code that is bulletproof (and yes, of course, long and expensive to develop), then Rust is your ideal choice.
                      Not to me, I don't want my app to crash at random points at random times at runtime because the borrow checker saw aliased mutability or something and judges like: found a black person, he must be in prison unless proven innocent - in the name of security.
                      Imagine your app crashing at runtime in a plane that is landing or other such scenarios like life support in a hospital.

                      Comment

                      Working...
                      X