Announcement

Collapse
No announcement yet.

Mesa Developers Discuss The Possibility Of Rust Graphics Driver Code

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

  • Mesa Developers Discuss The Possibility Of Rust Graphics Driver Code

    Phoronix: Mesa Developers Discuss The Possibility Of Rust Graphics Driver Code

    A proposal is being discussed over the possibility of beginning to make use of the Rust programming language within Mesa 3D for this open-source OpenGL/Vulkan driver stack along with the likes of Gallium3D video acceleration...

    http://www.phoronix.com/scan.php?pag...020-Discussion

  • #2
    I read that as Nasa Developers ... and thought a mix of "Wait?! They're using Rust....for graphics drivers?" and "Typo: It's NASA."

    And then I read it again

    Comment


    • #3
      The issue with Rust is still that there is no proper compiler that just creates proper bytecode, just this LLVM thing. I guess if GCC could compile Rust, this can be asked again.

      Comment


      • #4
        > Some also feel Mesa would just be better off moving towards modern C++ standards as a better fit for these drivers than going for Rust while achieving many of the same benefits

        This should be done anyway independently of Rust
        ## VGA ##
        AMD: X1950XTX, HD3870, HD5870
        Intel: GMA45, HD3000 (Core i5 2500K)

        Comment


        • #5
          Much of a Rust toolchain installation is LLVM and Mesa often needs LLVM anyway.

          Comment


          • #6
            Originally posted by Alexmitter View Post
            The issue with Rust is still that there is no proper compiler that just creates proper bytecode, just this LLVM thing. I guess if GCC could compile Rust, this can be asked again.
            Yeah this is actually one of my major concerns.
            I'm really relucant to be packed into the LLVM bandwagon

            Comment


            • #7
              Originally posted by Alexmitter View Post
              The issue with Rust is still that there is no proper compiler that just creates proper bytecode, just this LLVM thing. I guess if GCC could compile Rust, this can be asked again.
              What does "proper bytecode" mean?
              According to these:
              https://benchmarksgame-team.pages.de.../rust-gpp.html
              https://benchmarksgame-team.pages.de...test/rust.html

              Rust is basically the same as C++. C does a little better in the memory department, but overall speed is again the same.

              Comment


              • #8
                Originally posted by Alexmitter View Post
                The issue with Rust is still that there is no proper compiler that just creates proper bytecode, just this LLVM thing. I guess if GCC could compile Rust, this can be asked again.
                Not sure what you're getting at, both LLVM and GCC produce native binaries, which perform pretty much the same.

                Comment


                • #9
                  Originally posted by darkbasic View Post
                  > Some also feel Mesa would just be better off moving towards modern C++ standards

                  This should be done anyway independently of Rust
                  Moving from C to C++ isn't a no-brainer any more than moving from C to Rust is. C has a lot of problems, but it has served Mesa well so far, and adding any new language to a single-language project is a big ask. Adding two languages to the mix in one go is probably pushing it too far, so it makes sense to choose carefully.

                  C++ has more developers (especially if you put all C++ versions in the same bucket), it's well integrated with C build systems, has slightly wider platform support, and allows more niche code constructs. But compared to Rust it takes longer to become proficient with, it takes a lot more effort to secure, it has more linking/FFI issues, it has more platform-specific differences... It's a complex set of pros&cons, and rational people can reach opposite conclusions.

                  Comment


                  • #10
                    Originally posted by moltonel View Post

                    Moving from C to C++ isn't a no-brainer any more than moving from C to Rust is. C has a lot of problems, but it has served Mesa well so far, and adding any new language to a single-language project is a big ask. Adding two languages to the mix in one go is probably pushing it too far, so it makes sense to choose carefully.

                    C++ has more developers (especially if you put all C++ versions in the same bucket), it's well integrated with C build systems, has slightly wider platform support, and allows more niche code constructs. But compared to Rust it takes longer to become proficient with, it takes a lot more effort to secure, it has more linking/FFI issues, it has more platform-specific differences... It's a complex set of pros&cons, and rational people can reach opposite conclusions.
                    Tbh this isn't about adding Rust or C++ to Mesa code directly, but rather to Mesa drivers. I think that's a smart approach, if it doesn't pan out, you only have to revert one or two drivers.

                    Comment

                    Working...
                    X