In English

A Rust-based Runtime for the Internet of Things

Niklas Adolfsson ; Fredrik Nilsson
Göteborg : Chalmers tekniska högskola, 2017. 93 s.
[Examensarbete på avancerad nivå]

As the number of connected devices increases, known as the Internet of Things (IoT), reliability and security become more important. C and C++ are common programming languages for IoT devices, mostly due to their fine-grained memory management and low runtime overhead. As these languages are not memory-safe and memory management has proven to be difficult to handle correctly, problems such as buffer overflows and dangling pointers are likely to increase as the IoT devices become more prevalent. These problems can result in reliability and security issues. In contrast to C and C++, Rust is a memory-safe systems programming language that, just like C and C++, provides low runtime overhead and fine-grained memory management. Potentially, Rust can reduce the number of unreliable and insecure connected devices as a result of memory safety. Tock is an embedded operating system implemented in Rust, and thus it is inherently safe when it comes to memory management. In this thesis, we investigate if Rust is suitable to develop device drivers. We implement four different device drivers covering a range of functions and evaluate the energy consumption as well as the execution time of our drivers compared to other current state-of-the-art embedded operating systems. These device drivers enhance the usability of Tock for connected devices. With the device drivers, we show that Tock introduces an overhead in terms of execution speed but has a similar energy consumption in comparison to the current state-of-the-art embedded operating systems. Despite the increased runtime overhead, we argue that the benefits of Tock and Rust, i.e., increased reliability and security along with similar power consumption exceeds the negative aspect. Finally, we conclude that Rust and Tock are appropriate for developing device drivers for IoT devices.

Nyckelord: IoT, Tock, Rust, Device drivers, Embedded systems, Bluetooth Low Energy, Embedded Operating System



Publikationen registrerades 2017-06-22. Den ändrades senast 2017-06-22

CPL ID: 250074

Detta är en tjänst från Chalmers bibliotek