Starting Point
A few kilobytes of RAM and non-volatile storage at most 1 MB are prominent restrictions when working with a microcontroller on an embedded system. Additionally, the clock most certainly is below 200 MHz, which means that the firmware must be efficient. Predominantly C or sometimes C++ is used as the programming language of choice. Another aspect of embedded systems is their reliability. An electronic locking system runs for years without a reset and still has to perform its task without failure. The firmware therefore must be deterministic and memory safe. This is where C passes the responsibility to the user. Void pointer casting, pointer management and memory freeing are error-prone, leading to runtime errors. These errors are expensive to find and fix.
The solution for many of these problems might lie in a fairly new programming language. Rust is a system programming language focused on memory-safety and thread-safety at compile time [47]. Removing the chance for data races and a strong type system help to reduce runtime errors. Because Rust enforces its rules at compile time, no overhead is added at runtime, which results in the same performance as code written in C/C++. Thread-safety might seem irrelevant on a single-core microcontroller but comes in use whenever an interrupt service routine is called.
With the increasing complexity of an embedded system application, it becomes difficult to manage all tasks and resources. A real-time operating system (RTOS) helps organize and synchronize them. It also allows scheduling tasks to a specific time in the future deterministically.
As the number of native Rust RTOS is fairly limited, there is an opportunity to develop a new Rust RTOS with a new concept. [16]