This three part series of articles explores the upcoming Rust support for the Linux kernel. With Linux v6.0 on the horizon the work seems to have matured enough that Linus himself hopes for it to be merged soon. The introduction of Rust as a language for writing kernel code is expected to mark a turning point on the road towards a safer operating system. Time to take a closer look at how kernel module development will be done on the Rust end.
The articles are written from the perspective of an application
developer and user of the Linux kernel who is not directly involved
with kernel development.
The goal is to get an overview of the extent to which Rust will have
been integrated into the kernel and what options the programmer is
given to interact with the non-Rust parts.
To that end, part two and three discuss various related topics by
developing step by step a small demo module.
In its final iteration this module will provide a means of changing
the color palette of the kernel console through a sysctl
.
The demo module is a partial kernel-side implementation of the author’s vtcol utility which among other things allows manipulating the console palette.