In a recent post on the Linux Kernel Mailing List, Linus Torvalds promised “a number of fairly core new things” in Linux kernel 6.1, and the first one seems to have appeared: as reported by The Register, the Rust programming language will be directly supported in the OS.
The news isn't exactly unexpected as patches to add Rust to Linux go back for some time, with version 9 appearing in August 2022. At the recent Open Source Summit Torvalds' keynote indicated that we should expect Rust to appear in 6.1. Right now, Rust has a group of developers working on support for the Linux Kernel and in a pull request made by Kees Cook on October 1, accepted by Torvalds, we see the first steps towards its inevitable arrival in 6.1.
Adding support for Rust adds about 12,500 lines of code to the Linux kernel, which is itself written in C, with which Rust has a certain amount of interoperability. However, GCC, the Gnu Compiler Collection, cannot compile the new language, and Clang, which can, has its own shortcomings if you want to write code for architectures other than x86 and Arm. With Rust set to receive official Linux support, and an eager community of kernel hackers, it can only be a matter of time before Rust is available to more architectures. The new kernel is expected to be available from December this year.
Some developers have already begun showing what can be done with Rust on Linux, with Western Digital’s principal engineer Andreas Hindborg showing off an NVMe SSD driver for Linux written in Rust at the 2022 Linux Plumbers Summit, which had a whole micro conference dedicated to Rust in Linux.
Rust is a general-purpose programming language influenced by C++ that was created in 2006 and hit version 1.0 in 2015. It grew out of a personal project by Mozilla employee Graydon Hoare, and was sponsored by Mozilla until 2020, when corporate restructuring caused by the Covid pandemic caused the Rust Foundation to be founded in 2021. Amazon Web Services, Huawei, Google, Microsoft and Mozilla now support the foundation, and Google supports Rust in its Android Open Source Project. The language is notable for its elegance, its zero-tolerance approach to memory safety, and the speed of its growth in popularity.
It’s also known as a high-performance language, created with the intention of marrying the flexible syntax of a high-level language with the hardware control and speed of a low-level one. Parallelism is also one of its fortes, and its strong memory safety - it notably doesn’t incorporate a garbage collector to return memory that’s no longer being referenced by a program to the system, as C# and Java do. The memory errors introduced by C programmers could be a thing of the past with Rust’s memory-safe features.
Can anybody tell me why?
I'm perfectly fine with C/C++ as the main languages for the Linux Kernal
I know RUST is a C/C++ relative, but it's like that weird cousin.
Has RUST been tested properly for security issues?
I trust this work wasn't undertaken lightly. It's been under way for several years. Right now, it's just limited to device drivers. If it turns out to be as big a liability as you claim, I'm sure it'll be addressed or removed.
Safety & security are its main selling points. If you're interested, I'd encourage you to read up on it.
The other thing about C++ is that it's been fairly polarizing. Those who still use pure C have likely made a conscious choice to resist C++, making it a harder sell for getting them to adopt it. Anyway, it's a moot point (for the Linux kernel, anyway). It looks like they successfully fended off C++ and its evolutionary path will now potentially be a Rusty one.
What I take issue with is characterizing C++ as "ambiguous", though I'd have to agree that it has a lot of complexity (or richness, as some may choose to characterize it).
It's pretty rare, in this industry, to see people advocate for sticking with technology that's literally 50 years old. It dates back to a time when most software was written on punch cards and most "mini-computers" (which were typically refrigerator-sized) had at most a couple MB of RAM and ran at a couple MHz or less.
The threat of a 3rd world war (why?)
Nuclear war threat (why?)
The RUST threat (why?)
...The answer to your question (why?) is that there is no answer.
What the Rust advocates claim (and don't get me wrong, I'm not a Rust user, but here's their argument, as I understand it):
Fewer bugs - Rust has memory safety features not found in C.
Fewer security exploits - along with the memory safety, Rust also has security features as core parts of the language.
Improved productivity - being more modern & expressive, you can do more with fewer lines of code.
Larger talent pool - C is a rather primitive language that fewer programmers want to work in, these days.
Somewhere in there ought to be room for performance improvements, as well. The Linux kernel has lots of algorithms and data structures, many of which weren't terribly efficient or haven't scaled well. Using a safer language that's easier to work within should (eventually) facilitate improving lots of aspects in the kernel that might've either seemed to risky or too much effort to tackle, previously.