Skip to Main Content
Rust in Android: move fast and fix things
["How can teachers and students use AI?", "What are the newest features in Chrome?", "How can I learn new AI skills?"]

Android Security

Rust in Android: move fast and fix things



Updated data for 2025. This data covers first-party and third-party (open source) code changes to the Android platform across C, C++, Java, Kotlin, and Rust. This post is published a couple of months before the end of 2025, but Android’s industry-standard 90-day patch window means that these results are very likely close to final. We can and will accelerate patching when necessary.

A bar chart titled "New Insecure Memory Code and Memory Security Vulnerabilities" shows a steady decline in the total percentage of new insecure memory code and memory security vulnerabilities from 2019 to 2025. A horizontal red dotted line represents the industry standard of 70% memory security, which is exceeded in the first three years but remains below it in the last four years.

Net lines of code added: Rust vs. C++, first-party Android code.
This chart focuses on first-party (Google-developed) code (unlike the previous chart that included all first-party and third-party code in Android.) We only include systems languages, C/C++ (which is primarily C++), and Rust.

A bar chart titled "First-Party Android Platform Development (Additions - Deletions)" shows the net change in lines of code (LOC) for Rust and C++. From 2020 to 2022, net C++ code was significantly higher than Rust's, which was minimal. In 2023, net C++ code began to decline while Rust's grew noticeably. By 2024, both languages ​​had similar levels of net code, and in the first three quarters of 2025, Rust's net code slightly surpassed C++'s. The note "Excludes third parties and vendors" is below the title. The vertical axis is labeled "LOC" and the horizontal axis "Year." A legend indicates that blue represents Rust and red represents C++.
A bar chart titled "Revisions per Change (Lower is Better)" displays data for 2023, 2024, and 2025. Each year is divided into four categories: XS, S, M, and L, ordered from lowest to highest. Each category has two bars, one blue representing Rust and one red representing C++. Generally, the number of revisions per change is lower for Rust compared to C++, especially in the larger categories for each year, suggesting better performance for Rust in terms of revisions per change.
A bar chart titled "Average Review Time per Change (Lower is Better)" compares the Rust and C++ programming languages ​​for the years 2023, 2024, and 2025. Each year is divided into four change size categories: XS, S, M, and L, ordered from smallest to largest. Generally, the average review time increases with the size of the change. For the XS, S, and M categories in all three years, Rust tends to have a slightly shorter or similar review time compared to C++. In the L category, the review time for C++ is noticeably longer in 2024 and 2025 compared to Rust, suggesting greater complexity in reviewing large changes for C++ in those years. The chart lacks specific time units on the vertical axis.
A bar chart titled "Change Rollback Rate (Lower is Better)" compares Rust and C++ in 2023, 2024, and 2025. Each year is divided into four change size categories: XS, S, M, and L, ordered from smallest to largest. Generally, the change rollback rate increases with the size of the change. In all categories (X, S, M, and L) across the three years, Rust tends to have a noticeably lower rollback rate compared to C++. The rollback rate for C++ is noticeably higher in 2024 and 2025 compared to Rust, suggesting greater stability in changes for Rust during those years. The chart lacks specific rate units on the vertical axis.