Google Adds Rust to the Linux Kernel

Technology, Google, Android, Linux, Rust Language


It's no surprise that Google has any interest in Linux, given that Android and ChromeOS have a Linux base. While Android development used to be in C and C++, Google has recently announced that the Android Open Source Project, or AOSP, now also supports the Rust programming language.

Google also wrote about how memory safety bugs are a top cause of Android stability issues. Around 70% of high severity security vulnerabilities come from problems with C and C++ that Google finds hard to fix.

Rather than rewriting old code in the Linux kernel, Google wants to write new code in Rust, leaving the legacy C and C++ code. Wedson Almeida Filho, a Software Engineer in Google's Android Team, writes more about the changes in "Google Online Security Blog: Rust in the Android platform" and "Google Online Security Blog: Rust in the Linux kernel."

According to Wedson Almeida Filho, "We feel that Rust is now ready to join C as a practical language for implementing the kernel," continuing that "It can help us reduce the number of potential bugs and security vulnerabilities." Google has developed a prototype comparing the old C code and the new Rust code regarding safety and performance.

Wedson Almeida Filho also wrote that since Rust is a new language, that they have the opportunity to enforce best practices for documentation and uniformity, something that will benefit the kernel as a whole if done well.

Many developers already see the Rust language as a good choice for performance and security reasons, so hopefully, having it in the Linux Kernel brings these benefits to Linux.

The Linux Kernel is used in many operating systems on many device types, ranging from IoT devices to massive mission-critical servers. A lot of these Linux-based systems include the servers that power my websites and projects, as well as millions of other sites. Hopefully, the performance, stability, and security benefits from the Rust language could help all of us using Linux instead of just Android users.

Note 1: I plan on updating this article as new information becomes available.

Note 2: Recently I have started to learn the Rust programming language myself, so hopefully, there will be more articles on it and software written in it in the future.

Copyright © 2021, Anton McClure. All Rights Reserved.

Recent Posts: