Result: Modular Implementation of the Rust RTIC Framework by Multi-Pass Macro Expansion
info:eu-repo/semantics/openAccess
English
1525885908
From OAIster®, provided by the OCLC Cooperative.
Further information
Embedded systems connected to the internet are everywhere in our daily lives, from cars to heat pumps. Memory-unsafe languages, such as C and C++, are commonly used in embedded systems. However, these languages come with safety and cybersecurity risks. Real-Time Interrupt-driven Concurrency (RTIC) is a framework for embedded Rust. It provides an executable model for hard real-time systems that guarantees race-free and deadlock-free scheduling. The implementation in Rust enables RTIC to effectively utilise the Rust language's memory safety features, thereby eliminating classes of vulnerabilities common to C and C++. However, RTIC needs more contributors to achieve further adoption and drive maintenance and development forward. The current implementation of the RTIC framework is a monolithic codebase with high coupling, meaning contributors need to understand the whole project before they can make any changes. Making the RTIC codebase modular would allow a contributor to focus on one part at a time. This thesis implements and evaluates a modular approach inspired by multi-pass compilers. Each pass handles and expresses an RTIC feature in other, not yet handled features, or standard Rust code. This approach reduces RTIC features in the code, pass by pass, until only one pass remains. It can be viewed as lowering code towards more primitive features, where the final pass produces code that the Rust compiler can use to generate an application. Each pass is a module that may be removed, changed, or entirely replaced. The results indicate the feasibility of multi-pass implementations. A feature called \textit{forward passing} simplified the implementation process.. Each pass may emit additional code to be executed either before or after the system initialisation code generated by downstream passes. The proof-of-concept implementation demonstrates the feasibility of the proposed approach.. Our evaluation confirms the importance of finding appropriate pass partitioning, spec