Mesa Developers Discuss The Possibility Of Rust Graphics Driver Code

Written by Michael Larabel in Mesa on 2 October 2020 at 08:24 AM EDT. 38 Comments
MESA
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.

Just days after it was brought up that AMD is hiring Rust developer(s) for working on graphics driver tooling, Mesa developers coincidentally are also discussing prospects of Rust code within Mesa.

This Rust'ing Mesa proposal wasn't brought up by AMD developers but rather open-source Panfrost Gallium3D driver Alyssa Rosenzweig. Alyssa argues in favor of allowing Rust drivers in Mesa for memory safety and other benefits often promoted as Rust talking points. Right now most of the Mesa code is within the C programming language.

But not everyone is in favor of seeing Rust code within Mesa. Concerns were quickly expressed over build system complications, distributions then needing to pull in Rust for building this critical component of the Linux desktop, build time concerns for Rust, and other complications. 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.

The discussion can be found via this mailing list thread. Nothing has been firmly decided yet as it seems to be quite split, but even if a decision is made given the massive size of the Mesa code-base it's unlikely any large chunks of Mesa would be immediately converted into Rust in the near-term. It's also quite possible Mesa developers would wait on allowing any Rust code into their tree until if/when the Linux kernel begins allowing Rust code.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week