

This post discusses some of the key design considerations and resulting decisions we made in integrating Rust support into Android’s build system.Ī RustConf 2019 meeting on Rust usage within large organizations highlighted several challenges, such as the risk that eschewing Cargo in favor of using the Rust Compiler, rustc, directly (see next section) may remove organizations from the wider Rust community. Currently this means the Soong build system (where the Rust support resides), but these design decisions and considerations are equally applicable for Bazel when AOSP migrates to that build system. For Android, one important area was assessing how to best fit Rust into Android’s build system.

As with any large project, introducing a new language requires careful consideration. The Android team has been working on introducing the Rust programming language into the Android Open Source Project (AOSP) since 2019 as a memory-safe alternative for platform native code development.
