On Software Projects that Migrate to Rust
J.R. van Driel (TU Delft - Electrical Engineering, Mathematics and Computer Science)
D. Spinellis – Mentor (TU Delft - Electrical Engineering, Mathematics and Computer Science)
J.G.H. Cockx – Graduation committee member (TU Delft - Electrical Engineering, Mathematics and Computer Science)
More Info
expand_more
Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.
Abstract
Memory safety vulnerabilities present a critical challenge, driving both commercial and open-source projects to adopt the Rust programming language. Despite this trend, no previous research has examined the approaches taken by open-source projects migrating to Rust and their impact on software quality.
This thesis takes a mixed-methods approach to analyse the migration process. It introduces a novel, language-agnostic technique that helped identify 285 migrations by tracking Abstract Syntax Tree (AST) identifiers over time and across different repositories. Interviews with 38 of these projects revealed that they were migrating not only from C/C++ for memory safety, but also from higher-level languages such as Go, Python and JavaScript, in order to improve performance and maintainability.
Although project authors overwhelmingly report that their migration was successful, a quantitative analysis of the same projects across 22 metrics presents a more nuanced perspective. It shows testing practices improved post-migration, while some structural metrics showed a decline, with increased code duplication and significant reliance on `unsafe` code blocks. This highlights a possible discrepancy between developer perception and measurable code quality, suggesting that successful migration may be helped with more upfront architectural planning.