Mesa developers discuss adding Rust code

Mesa project developers are discussing the ability to use the Rust language to develop OpenGL / Vulkan drivers and graphics stack components. The discussion was initiated by Alyssa Rosenzweig, who develops the driver panfrost for GPU Mali based on Midgard and Bifrost microarchitectures. The initiative is under discussion, no specific decisions have been made yet.

Proponents of using Rust highlight the possibility of improving the quality of memory management and getting rid of such problems as accessing a memory area after it has been freed, dereferencing null pointers, and buffer overruns. Rust support would also make it possible for Mesa to include third-party developments such as a software rendering system. Win with an implementation of the Vulkan graphics API written in Rust.

It is noted that the urgency of improving the security of drivers has recently grown in light of the use of OpenGL when executing untrustworthy code in browsers that support WebGL, which makes drivers an important vector for attacks on user systems. At present, Mesa already uses tools such as ralloc and static code analysis to minimize memory problems, but their use is not enough.

Opponents of Rust Implementation count them.that most of the useful features of Rust can be obtained by moving development to modern C ++, which looks more attractive in the conditions that most of Mesa is written in C. One of the arguments against Rust also mentions complication build systems, not desire bind to the cargo package system,
expanding the requirements for the assembly environment and need to include the Rust compiler into build dependencies required to build key desktop components on Linux.

The move towards using Rust for development is also being seen at AMD, which recently opened a vacancy Rust programmer to develop a new toolkit related to 3D drivers for Radeon GPUs.

Source: opennet.ru

Add a comment