The Binder Linux driver is being rewritten in Rust
Alice, who works with me in the Android team, has just posted a patch series which replaces the C Binder driver with a Rust implementation!
Binder is the IPC mechanism used in Android: every time an application needs to talk to another application or a system service, they use Binder to transfer the data (using AIDL to describe the interface). Binder is therefore a critical part of the security on an Android device — and it has been the course of security vulnerabilities in the past.
Alice explains the motivation well in her patch thread:
It's #1 (high complexity) that has made continuing to evolve Binder and
resolving #2 (tech debt) exceptionally difficult without causing #3
(security issues). For Binder to continue to meet Android's needs, we
need better ways to manage (and reduce!) complexity without increasing
the risk.
The new Rust driver has performance that is virtually identical to the existing C driver (as expected since the new driver uses the same algorithms). See this graph as an example (there are more benchmarks in Alice's first message on the thread.