Red Hat’s Karol Herbst, who is involved in the development of Mesa, the Nouveau driver, and the OpenCL open stack, has, an experimental software implementation of OpenCL (OpenCL frontend) for Mesa written in Rust. Rusticl acts as an analogue of the frontend already present in Mesa OpenCL and is also developed using the interface provided in Mesa .
The development wason September 17 at the conference (X.Org Developers Conference). The goal of the development was to study Rust, work out the best ways to integrate Rust into Mesa, try out creating API implementations in another language, and test the compatibility of Rust components with the rest of the C code. Development is not yet fully completed – CL CTS tests related to copying, reading and writing buffers are already successfully running, but compiler integration is not yet provided and there is no support for external crate packages in the build system. To generate bindings for Mesa and OpenCL, allowing cause Rust-functions in C code and vice versa, is involved .
Recall that a year ago, the Mesa developers already discussed the advisability of using the Rust language. Among the advantages of supporting Rust, they mentioned an increase in the safety and quality of drivers by getting rid of typical problems when working with memory, as well as the possibility of including third-party developments such as into Mesa(Vulkan implementation in Rust) . Among the shortcomings, it is noted the complication of the build system, the unwillingness to bind to the cargo package system, the expansion of the requirements for the build environment and the need to include the Rust compiler in the build dependencies, which are required to build the key components of the Linux desktop.