Zack's Kernel News
Zack's Kernel News
Chronicler Zack Brown reports on porting drivers to Rust, and empowering debuggers.
Porting Drivers to Rust
Daniel Almeida submitted Tyr, a Rust port of the Panthor driver, done as a collaboration between his own employer Collabora, along with ARM and Google. The Panthor driver, written in C, gives support for ARM's Mali series of graphics processing units (GPUs), which have become so all-important in artificial intelligence development and the fate of the universe. The Tyr port of Panthor, by Daniel and others, was an effort to migrate the driver to Rust. As Daniel put it, "The name 'Tyr' is inspired by Norse mythology, reflecting ARM's tradition of naming their GPUs after Nordic mythological figures and places."
The transformation of the Linux kernel from the C language to Rust is a long-term ongoing project. I personally don't know if the actual goal is to replace all C code with Rust in the kernel – maybe the kernel developers themselves don't know. But Rust's natural safety features that avoid various types of memory errors have made it one of a tiny set of languages welcomed by Linus Torvalds into the Linux kernel. For example, a likely candidate would be C++, seemingly the natural successor of C, and there was at one time a strong push by developers to let C++ into the kernel. However, Linus has always resisted accepting such patches. Now, suddenly Rust appears and is welcomed like a long-lost child.
There were immediately many technical responses to Daniel's submission, but nothing controversial. Rust's status in the kernel was recently highly contentious, because some maintainers simply refused to accept Rust patches at all. Linus finally made his policy clear: Maintainers are not required to accept Rust patches themselves … but then they also have no say in which Rust patches go into the kernel. Since then, the Rust floodgates have definitely opened.
[...]
Buy this article as PDF
(incl. VAT)
