While Linux is not primarily an embedded-focused operating system, it is still used on platforms such as the Raspberry Pi. In the case of these platforms, kernel modules provide a helpful way to interact with various devices at a kernel level, which often communicate using low-level protocols, such as SPI or I2C.
Using Rust for that kind of workloads provides numerous advantages, and while the kernel API for these protocols has been tried and tested for a very long time, there are currently no Rust abstractions available.
In this presentation, we will talk about our ongoing effort to bring an abstraction over the SPI protocol in safe Rust, for Linux, on the ARM64 platform, and how we used it to implement a simple device driver. The talk will draw comparisons against the original implementation in C, which provides the same amount of features. Finally, we will dive into the techniques used and our experience working with Rust-for-Linux.