Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Technology
  3. Linux royalty backs adoption of Rust for kernel code

Linux royalty backs adoption of Rust for kernel code

Scheduled Pinned Locked Moved Technology
technology
57 Posts 32 Posters 2 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S [email protected]

    I don't know about you, but I prefer provably correct code over "just trust me bro."

    There's an analogy I like here. A manager at a trucking company was hiring a new driver, and he asked each of them how close they could get to the edge on a mountain pass. The first said, "I can get within a wheel's width." The second said, "I can drive on the edge, with part of the tire hanging off." And the third said, "I stay away from the edge." The third applicant got the job, because why take the risk?

    That's how I feel about C/C++. Why use them if Rust can do the job? You get a lot more safety features without sacrificing performance, what's not to like?

    G This user is from outside of this forum
    G This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #19

    That’s kind the entirety of my point: if Rust is a tool that can make expressing algorithms safer and less prone to error - and it can, in a logically provable sense - then what the fuck ground do you have to push back on?

    E 1 Reply Last reply
    0
    • zachariah@lemmy.worldZ [email protected]

      Just fork it, do a complete rewrite in Rust, and call it “Runix”

      More OS options is better for everyone.

      J This user is from outside of this forum
      J This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #20

      Theres heaps of stuff that is under-developed or mssing, but they prefer to rewrite working code in Rust, because ideology.

      We are witnessing the death of Linux here, no less, replacing a working kernal with an still undefined language that everyone will have forgotten in 5 years.

      1 Reply Last reply
      0
      • S [email protected]

        Greg Kroah-Hartman... urged fellow contributors to embrace those interested in contributing Rust code to improve the kernel.

        "Adding another language really shouldn't be a problem... embrace the people offering to join us

        Thoughts on this?

        D This user is from outside of this forum
        D This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #21

        I feel like better tooling is a safer bet. I know people hate on AI here but tooling that can detect flaws in C memory management would be basically as good as Rust itself.

        S 1 Reply Last reply
        0
        • L [email protected]

          I just want WindowsXP without security risks. If Linux could make a WindowsXP clone, that works with exe files, and works exactly like WindowsXP, except handles modern standards, I would jizz all over the place.

          Yeah. I'm leaving it in as motivation for linux developers. If they don't want to hear about my jizz spraying like a firehose, they should made LindowsXP.

          SEE??? I EVEN GAVE YOU A GREAT BRAND NAME!

          loweffortname@lemmy.blahaj.zoneL This user is from outside of this forum
          loweffortname@lemmy.blahaj.zoneL This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #22

          There was a "Lindows" back in the day...

          https://en.m.wikipedia.org/wiki/Linspire

          1 Reply Last reply
          0
          • darklamer@lemmy.dbzer0.comD [email protected]

            The second they make it a mixed code base, that's the same second quality will deteriorate.

            I envy your confidence!

            B This user is from outside of this forum
            B This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #23

            Maybe I'm wrong, but as I read the article, Linus isn't convinced this is a good idea either.
            I'm not saying things can never change, but opening for a mixed code base is a recipe for disaster.

            G 1 Reply Last reply
            0
            • S [email protected]

              In general, for me, Rust > C > C++.

              I've heard people say that C is like a loaded and cocked revolved, and if you're not careful, you could blow your foot off, whereas C++ is like a loaded and cocked sawed-off shotgun, and if you're not careful, you could blow your leg off.

              F This user is from outside of this forum
              F This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #24

              C++ is a semi automatic shotgun with 200 barrels pointing in all directions.

              G 1 Reply Last reply
              0
              • S [email protected]

                Greg Kroah-Hartman... urged fellow contributors to embrace those interested in contributing Rust code to improve the kernel.

                "Adding another language really shouldn't be a problem... embrace the people offering to join us

                Thoughts on this?

                L This user is from outside of this forum
                L This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #25

                In my mind, introducing Rust would only make sense if:

                1. There was a serious lack of current kernel developers (which I don't think there is)
                2. New hardware and tech was evolving at a rate that the Linux Kernel could not keep up (again, I don't think this is am issue)
                3. The end goal is to migrate the entire Kernel to Rust.

                Regarding point 3, having both C and Rust really only makes sense as a transition phase (measured in years) - as it would require kernel developers to be savvy in both C and Rust, or would force developers to stay within whatever domains were implemented in C or Rust.

                G W L 3 Replies Last reply
                0
                • S [email protected]

                  Greg Kroah-Hartman... urged fellow contributors to embrace those interested in contributing Rust code to improve the kernel.

                  "Adding another language really shouldn't be a problem... embrace the people offering to join us

                  Thoughts on this?

                  F This user is from outside of this forum
                  F This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #26

                  Despite my drive-by shitposts in the rest of this thread I want to make a serious point here.

                  There's a large part of software engineering that thinks languages are chosen based on the problem, as a tool for a job.

                  They aren't. They're chosen based on the team, on how well the team knows and can use the tool.
                  On how many people can be hired with the knowledge of the tool to work immediately.

                  Sometimes, even if the team knows C well, there can be a problem so different it's worth using another tool. say python for some testing scripts on a C project.

                  But rust and C are too similar for this to apply.
                  If you want rust to be used for the kernel you have to push for it to be more well known and used, so more Devs come into teams already knowing it well.
                  Anyone agreeing to work on a team using rust is making a career decision that will be stay on their CV forever and you need them to feel good about this, that it will give them more opportunity in future.

                  It'll take 20+ years because that's how long legacy code is often maintained for and we already have 20+ years of future legacy code for C teams to deal with. We're all making more future legacy C code than future legacy rust code too.

                  I'm trapped in C++ so I'm doomed but good luck C and Rust coders.

                  B P 2 Replies Last reply
                  0
                  • L [email protected]

                    In my mind, introducing Rust would only make sense if:

                    1. There was a serious lack of current kernel developers (which I don't think there is)
                    2. New hardware and tech was evolving at a rate that the Linux Kernel could not keep up (again, I don't think this is am issue)
                    3. The end goal is to migrate the entire Kernel to Rust.

                    Regarding point 3, having both C and Rust really only makes sense as a transition phase (measured in years) - as it would require kernel developers to be savvy in both C and Rust, or would force developers to stay within whatever domains were implemented in C or Rust.

                    G This user is from outside of this forum
                    G This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #27

                    What's in your mind does not coincide with the professional experience of Greg KH. You shoyld read what he had to say on the subject.

                    L 1 Reply Last reply
                    0
                    • B [email protected]

                      Maybe I'm wrong, but as I read the article, Linus isn't convinced this is a good idea either.
                      I'm not saying things can never change, but opening for a mixed code base is a recipe for disaster.

                      G This user is from outside of this forum
                      G This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #28

                      You're wrong, but it's possible the article gave you that impression. Read the mailing-list thread.

                      It's particularly worth reading Ted T'so's contribution, which (considering his rude behaviour at the recent con led to a previous round of this nonsense) seems much more positive.

                      1 Reply Last reply
                      0
                      • S [email protected]

                        I don't know about you, but I prefer provably correct code over "just trust me bro."

                        There's an analogy I like here. A manager at a trucking company was hiring a new driver, and he asked each of them how close they could get to the edge on a mountain pass. The first said, "I can get within a wheel's width." The second said, "I can drive on the edge, with part of the tire hanging off." And the third said, "I stay away from the edge." The third applicant got the job, because why take the risk?

                        That's how I feel about C/C++. Why use them if Rust can do the job? You get a lot more safety features without sacrificing performance, what's not to like?

                        W This user is from outside of this forum
                        W This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #29

                        Did somebody say "provably correct"?

                        Haskell has entered the chat

                        1 Reply Last reply
                        0
                        • L [email protected]

                          In my mind, introducing Rust would only make sense if:

                          1. There was a serious lack of current kernel developers (which I don't think there is)
                          2. New hardware and tech was evolving at a rate that the Linux Kernel could not keep up (again, I don't think this is am issue)
                          3. The end goal is to migrate the entire Kernel to Rust.

                          Regarding point 3, having both C and Rust really only makes sense as a transition phase (measured in years) - as it would require kernel developers to be savvy in both C and Rust, or would force developers to stay within whatever domains were implemented in C or Rust.

                          W This user is from outside of this forum
                          W This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #30

                          it would require kernel developers to be savvy in both C and Rust

                          From my experience knowing how both C and rust works makes you a better developer in both languages.

                          L bilb@lem.monsterB 2 Replies Last reply
                          0
                          • B [email protected]

                            That does NOT sound like a good idea.

                            We've turned our development model into a well-oiled engineering marvel,

                            Exactly, and I'm pretty sure one of the reasons is that it's remained on C, and NOT switched to C++, as has been often suggested.
                            The second they make it a mixed code base, that's the same second quality will deteriorate. Mixed code base is a recipe for disaster.

                            Edit:

                            Torvalds eventually responded by defending the Linux kernel development process and scolding Martin for grandstanding on social media about the issue. Martin later quit as a Linux maintainer and resigned from the Asahi Linux project.

                            Seems like Linus isn't onboard with this.

                            But I guess all the downvoters know better?

                            opening for a mixed code base is a recipe for disaster.

                            Greg Kroah-Hartman:

                            Yes, mixed language codebases are rough, and hard to maintain, but we are kernel developers, dammit.

                            That's special pleading, that lacks basis in reality. Still he admits it's rough to mix codebases.

                            I'm not claiming Rust wouldn't be brilliant in some situations, but the detraction of a mixed codebase is worse than the benefit.

                            W This user is from outside of this forum
                            W This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #31

                            Seems like Linus isn't onboard with this.

                            To the contrary:

                            https://lemmy.ml/post/26272942

                            1 Reply Last reply
                            0
                            • S [email protected]

                              I don't know about you, but I prefer provably correct code over "just trust me bro."

                              There's an analogy I like here. A manager at a trucking company was hiring a new driver, and he asked each of them how close they could get to the edge on a mountain pass. The first said, "I can get within a wheel's width." The second said, "I can drive on the edge, with part of the tire hanging off." And the third said, "I stay away from the edge." The third applicant got the job, because why take the risk?

                              That's how I feel about C/C++. Why use them if Rust can do the job? You get a lot more safety features without sacrificing performance, what's not to like?

                              R This user is from outside of this forum
                              R This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #32

                              Because people already know C/C++.

                              S 1 Reply Last reply
                              0
                              • W [email protected]

                                it would require kernel developers to be savvy in both C and Rust

                                From my experience knowing how both C and rust works makes you a better developer in both languages.

                                L This user is from outside of this forum
                                L This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #33

                                Oh absolutely, but you could argue the same for learning lisp or mastering any functional programming language (list comprehensions, etc). It will improve your design patterns when you go back to an object oriented language with some elements of functional programming.

                                B W 2 Replies Last reply
                                0
                                • G [email protected]

                                  What's in your mind does not coincide with the professional experience of Greg KH. You shoyld read what he had to say on the subject.

                                  L This user is from outside of this forum
                                  L This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #34

                                  What?!? Actually, read the article? What is this, Reddit? /s

                                  Seriously, though - let me spin the question around: what, in your mind, overlaps with what Greg said?

                                  (plus, OP was just interested in people opinions - not whether they align/contradict with Greg, Linus, etc)

                                  G 1 Reply Last reply
                                  0
                                  • L [email protected]

                                    What?!? Actually, read the article? What is this, Reddit? /s

                                    Seriously, though - let me spin the question around: what, in your mind, overlaps with what Greg said?

                                    (plus, OP was just interested in people opinions - not whether they align/contradict with Greg, Linus, etc)

                                    G This user is from outside of this forum
                                    G This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #35

                                    https://lore.kernel.org/rust-for-linux/2025021954-flaccid-pucker-f7d9@gregkh/

                                    G S 2 Replies Last reply
                                    0
                                    • G [email protected]

                                      https://lore.kernel.org/rust-for-linux/2025021954-flaccid-pucker-f7d9@gregkh/

                                      G This user is from outside of this forum
                                      G This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #36

                                      To add something to this: linux has avoided internal SPIs for a long time. It's often lauded as one of the reasons it hasn't ossified.

                                      However, some subsystems have a huge amount of complexity and hidden constraint in how you correctly use them. Some of that may be inherent, but more of it will be accidental.

                                      Wrapping type-erased shims around this that attempt to capture (some of) those semantics shines a light onto the problem. The effort raises good technical questions around whether the C layer can be improved. Where maintainers have approached that with an open mind, the results are positive for both C and Rust consumers. Difficult interfaces are a source of bugs; it's always worth asking whether that difficulty is inherent or accidental.

                                      1 Reply Last reply
                                      0
                                      • F [email protected]

                                        C++ is a semi automatic shotgun with 200 barrels pointing in all directions.

                                        G This user is from outside of this forum
                                        G This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #37

                                        Whilst it's gotten a lot better in the -17 and -20 iterations, the fact that there was recently a doorstop book published solely on the subject of C++ initialisation semantics is pretty telling.

                                        I really like what Herb Sutter's doing around cppfront; I still wouldn't use C++ unless I absolutely had to.

                                        1 Reply Last reply
                                        0
                                        • System shared this topic on
                                        • L [email protected]

                                          In my mind, introducing Rust would only make sense if:

                                          1. There was a serious lack of current kernel developers (which I don't think there is)
                                          2. New hardware and tech was evolving at a rate that the Linux Kernel could not keep up (again, I don't think this is am issue)
                                          3. The end goal is to migrate the entire Kernel to Rust.

                                          Regarding point 3, having both C and Rust really only makes sense as a transition phase (measured in years) - as it would require kernel developers to be savvy in both C and Rust, or would force developers to stay within whatever domains were implemented in C or Rust.

                                          L This user is from outside of this forum
                                          L This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #38
                                          1. There was a serious lack of current kernel developers (which I don't think there is)

                                          Maybe not at the moment, but my understanding is that the pool of qualified C programmers is shrinking rapidly, because the old guard is all ageing out and there simply are not enough intermediate developers coding in C at the level that Kernel development requires.

                                          Having a larger (and growing) pool of upcoming developers interested in systems programming and software excellence is one of the explicit stated reasons that Linus et al. considered Rust in the first place.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups