TUM Logo

A Systematic Approach to Gradually Integrate Rust into Existing Codebases

A Systematic Approach to Gradually Integrate Rust into Existing Codebases

Supervisor(s): Oliver Braunsdorf
Status: finished
Topic: Others
Author: Alexander Berkov
Submission: 2023-05-15
Type of Thesis: Bachelorthesis
Thesis topic in co-operation with the Fraunhofer Institute for Applied and Integrated Security AISEC, Garching

Description

Rust is a system programming language that runs blazingly fast, provides memory
safety and guarantees thread safety [Rus10]. It is designed to be a safe and concurrent
language, supporting functional as well as imperative and procedural paradigms.
Rust provides direct access to memory, the ability to manipulate bits and bytes and
writing assembly code. These features make Rust the perfect candidate to rewrite old,
unsafe C/C++ legacy code to Rust. But migrating large codebases from C/C++ to
Rust is not a trivial task. It requires a lot of investment, a lot of time and resources.
The discussion will start with the motivations for using Rust. Following that, a step-
by-step process for integrating Rust will be described, along with best practices for
properly setting up and executing the integration process. In conclusion, while finding
a secure interface boundary presents a complex task, the right strategic approach can
significantly streamline this process. Despite the initial complexity, the investment
in establishing a well-defined interface boundary can yield considerable long-term
benefits, including a more efficient, manageable, and future-proof codebase.