DEV Community

jeikabu
jeikabu

Posted on • Originally published at rendered-obsolete.github.io on

3

Rust in Android OS and Linux

Google had two recent announcements of particular interest to Rust enthusiasts: ongoing efforts to introduce Rust into Android OS and the Linux kernel.

While a number of memory-safe languages like Java/Kotlin/go/et al. are used in user-space, the majority of OSes are written in C/C++ where incorrect memory usage is still a source of “high severity” bugs. The idea is that using Rust would avoid such classes of bugs and provide other benefits.

The Linux article has a few specific examples for a simple character device, ioctl handling, and synchronisation primitives. They illustrate some of Rust’s advantages: immutability, static typing, lifetime checks, bounds checks, RAII, required initialisation and error-handling, and so on. Most achieved at compile-time rather than run-time.

Why not bring C++ to Linux? Linus Torvalds had this to say:

LOL. C++ solves none of the C issues, and only makes things worse. It really is a crap language.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up