HITTING THE M1
There was recently the first (but likely far from the last) Rust for Linux conference, known as “Kangrejos”. The purpose of the conference was to further work toward supporting Rust inside the kernel, specifically in driver code. Much interest in Rust exists within various communities because it simultaneously targets system programmers, but also aims to eliminate various memory safety issues inherent to C code. These issues arise from “UB” or Undefined Behaviour, and there’s a lot of it in the C programming language.
Rust aims to be both fast (and thus suitable for low-level programming) but also safe, since it provides careful tracking of the ownership of memory (pointer safety). For example allowing only one owner of an object, along with a mechanism (known as borrowing) for temporarily passing references between code functions. All of this is well and good, but I must confess that my first reaction to seeing talk of Rust inside the kernel was more along the lines of “here we go again”.
This is, however, what happens when you get set in your ways, and it can be a dangerous thing. I’ve been using Linux since the mid-90s, and as I enter my 40s soon, I seek to remind myself that I don’t want to be “that guy” in the rocking chair yelling at the kids to get off my lawn. It’s time to play with Rust and see what the fuss is about. I’ll write up my adventures with Rust in a future issue. In the interim, readers may enjoy Paul McKenney’s new blog series on the topic (paulmck. livejournal.com), beginning with adventures in the memory model.