Brussels / 3 & 4 February 2018

schedule

Rustarm AKA A project looking at Rust for Embedded Systems

Rust on embedded platforms


Rustyarm is a project in the Physical Computing group at the University of West of England looking at application of Rust on embedded micro controllers. UWE Sense is a new hardware and software platform for IoT, build with ARM micro controllers, Bluetooth LE and LoRaWAN, which runs a software stack written completely in Rust. While UWE Sense is a close to the metal implementation, UWE Audio, a new hardware platform for studying high performance audio using ARM micro controllers, uses Rust to implement a monadic reactive graph, supporting both an offline compiler and and Embedded DSL. UWE Audio uses safe Rust, for example, describing domain clock as generic associated types, providing both compile time guarantees that multiple streams will not be incorrectly sequenced at different sample rates, and the ability to dynamically compile for different parts of the system.

In this talk I will provide a high-level overview of the Rustyarm project, including how using Rust has made this project interesting, but also enabled providing guarantees with respect to the audio scheduler, for example. However, Rust has some short comings in the embedded domain and we provide details on some of these and what we and the wider community are doing to address them. As an example of Rust’s application in the embedded domain we present early work on UWE Audio and hardware and software platform for building digital music instruments, which as already noted is programmed with solely in Rust.

Rustyarm is a project in the Physical Computing group at the University of West of England looking at application of Rust on embedded micro controllers. UWE Sense is a new hardware and software platform for IoT, build with ARM micro controllers, Bluetooth LE and LoRaWAN, which runs a software stack written completely in Rust. While UWE Sense is a close to the metal implementation, UWE Audio, a new hardware platform for studying high performance audio using ARM micro controllers, uses Rust to implement a monadic reactive graph, supporting both an offline compiler and and Embedded DSL. UWE Audio uses safe Rust, for example, describing domain clock as generic associated types, providing both compile time guarantees that multiple streams will not be incorrectly sequenced at different sample rates, and the ability to dynamically compile for different parts of the system.

In this talk I will provide a high-level overview of the Rustyarm project, including how using Rust has made this project interesting, but also enabled providing guarantees with respect to the audio scheduler, for example. However, Rust has some short comings in the embedded domain and we provide details on some of these and what we and the wider community are doing to address them. As an example of Rust’s application in the embedded domain we present early work on UWE Audio and hardware and software platform for building digital music instruments, which as already noted is programmed with solely in Rust.

During the talk I will give a demonstration of UWE Audio and our embedded audio DSL, written in Rust. I also plan to have a number of the UWE Sense modules for people to look at, there is an App that that they can download, which talks to the sensors and logs dat to an open cloud infrastructure. The App is not developed in Rust, Nativescript is used, but the software for the sensors is. I don't plan to talk in detail about this part of our work, but I can provide links to our website and our partners, which will be launched in December 2017, and links to the software repos.

Full disclosure: UWE Audio is a reasonably new project and while we have a working system it would be misleading to say it is a complete project. For example, as our hardware platform has two ARM micro-processors, one for the control domain and one for the audio/cv domain our current compiler produces to Rust programs that are compiled separately and flashed to the devices. Our long term goal is to have the controller deploy DSP graphs to the audio processor dynamically via a Rust based API, simply in concept to OpenCL, but we are still quite a long way from reaching that final goal. That being said the project has been driven from the start with the goal of investigating Rust as an alternative to C for embedded programming and it's particular application in the audio domain and for this I believe it would be an interesting talk at FOSDEM.

Speakers

Photo of Benedict Gaster (cuberoo_) Benedict Gaster (cuberoo_)

Links