The Case for Writing a Kernel in Rust
Amit A. Levy, Bradford Campbell, Branden Ghena, Pat Pannuto, Prabal K. Dutta, Philip A. Levis · 2017
An operating system kernel written in the Rust language would have extremely fine-grained isolation boundaries, have no memory leaks, and be safe from a wide range of security threats and memory bugs. Previous efforts towards this end concluded that writing a kernel requires changing Rust. This paper reaches a different conclusion, that no changes to Rust are needed and a kernel can be implemented with a very small amount of unsafe code. It describes how three sample kernel mechanisms---DMA, USB, and buffer caches---can be built using these abstractions.