Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, we recommend utilizing android-latest-release instead of aosp-main. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP.
Rust IDE setup
Stay organized with collections
Save and categorize content based on your preferences.
The IDE support for Rust in Android relies on rust-analyzer.
rust-analyzer is a language server protocol
used by your IDE to understand the code structure and to provide features
such as code completion or jump-to definition. Before you start, search the
rust-analyzer QuickStart documentation for how to configure your
IDE or editor to use the rust-analyzer protocol.
Android provides the configuration that enables rust-analyzer to understand
how Android Rust modules are built. This is described in the Soong-generated file
rust-project.json. For some IDEs such as Visual Studio Code, this file is
generated by aidegen,
using the -l r option arguments (to select Rust as the language). If you use
a different IDE, manually generate a rust-project.json file with the following code:
// Generates rust-project.json in out/soong/
SOONG_GEN_RUST_PROJECT=1 m nothing
// Creates a symbolic link
ln -s $ANDROID_BUILD_TOP/out/soong/rust-project.json $ANDROID_BUILD_TOP
A prebuilt, stable version of rust-analyzer is available in-tree at
prebuilts/rust/linux-x86/stable/rust-analyzer.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-12-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-02 UTC."],[],[]]