[ENG-10302](https://linear.app/comm/issue/ENG-10302/ci-is-failling-with-toolchain-185-x86-64-unknown-linux-gnu-is-not)
----
**Android**
**The issue**
There was a new, major version of `rustup` ([1.28.0](https://blog.rust-lang.org/2025/03/02/Rustup-1.28.0.html)) with two breaking changes:
1. rustup will no longer automatically install the active toolchain if it is not installed - this makes our CI to fail on most of our pipelines
2. rustup show's output format has been cleaned up, making it easier to find out about your toolchains' status - this command is used by `Corrosion`, which we use to integrate Rust on Android
**Fix for 1**
In D14429, there is an example of how to do it explicitly, and it works, but because this major update caused many CI's to fail, there is a hotfix for this in [1.28.1](https://blog.rust-lang.org/2025/03/04/Rustup-1.28.1.html)
**Fix for 2**
To achieve that, we need to update Corrosion version to `0.5.1` which is prepared for new output format, [v0.5.1](https://github.com/corrosion-rs/corrosion/releases/tag/v0.5.1).
**Why NDK update?**
We need to bump Corrosion from `0.2.1` to `0.5.1`, which is a lot, and the minimal Rust version has been changed. According to this [blog post](https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html), the minimum supported NDK version is 23. I took it from [0.71-stable](https://github.com/facebook/react-native/blob/0.71-stable/template/android/build.gradle). It should be fine as we're probably going to have 27 soon after the react-native upgrade (cc. @angelika). There is some context on this in D5900 (cc. @ashoat).
----
**Commtest**
This is the same as issues described in [rustup/issues/4212](https://github.com/rust-lang/rustup/issues/4212). It is going to be fixed but in a not-yet published version [1.28.2](https://github.com/rust-lang/rustup/issues/4231), we can patch it by explixtly adding target in Dockerfile.