Application developers can primarily opt for Java or Kotlin to build their applications, but the lower layers of the operating system itself need more robust and bug-proof alternatives, such as C or C +. +. Google has now announced the Rust support as a supported programming language in AOSP.
From now on, lower layers of Android will be able to combine C, C ++ and Rust
Android made with Rust
For a year and a half, Google gradually incorporating the Rust programming language in a number of AOSP projects, such as the new Bluetooth stack.
The main advantage of Rust over C and C ++ is that it has mechanisms to improve memory security by reducing the need to use Sandbox
With tens of millions of lines of code in AOSP, rewriting everything in Rust would be a daunting and impractical task, so Google focus your efforts on using Rust in new developments
With a multitude of outbuildings and tool chains that need to be maintained, tools and testing infrastructure to update, and developers who need training, Google is considering making Rust a bigger part of Android it’s a multi-year project. For now, Rust will coexist with C and C ++ in Android development itself. For app developers, there is no change.
More information | Android Developers