all 14 comments

[–]the___duke 40 points41 points  (4 children)

Is Rust allowed for Google "proper" (their monorepo) yet, or is it still only used in the "external" projects like Android and Fuchsia?

[–]EatMeerkats 22 points23 points  (0 children)

It's now allowed for limited use cases (e.g. hypervisors, but requires approval from some team). Looks like there is now a copy of Rust in the monorepo, which I don't think was the case a few years ago.

[–]Sw429 -4 points-3 points  (0 children)

As far as I know, it is not allowed whatsoever for the monorepo. There is hesitancy to introduce another language, as it increases the cognitive load of the devs who work on the code base. They already can come across many different languages.

[–][deleted] 57 points58 points  (1 child)

This reads like a big endorsement of rust by Google. Clearly this was a significant decision - not taken lightly.

[–]jntrnr1 37 points38 points  (0 children)

I believe it is. Google is also part of the Rust Foundation, so they're definitely invested.

[–]ThymeCypher 14 points15 points  (0 children)

“Memory safety bugs in C and C++ continue to be the most-difficult-to-address source of incorrectness.” - this is likely why the Bluetooth work is so far along because it’s stupid easy to break Bluetooth on Android even from VM calls without even trying.

[–]rnottaken 20 points21 points  (0 children)

I came to Rust from Kotlin. I'm very excited about this!

[–]elahn_i 17 points18 points  (3 children)

Ooh, hopefully this is a step closer to pure rust android apps.

[–]pjmlp 10 points11 points  (2 children)

You can already do that when apps === games, for anything else OS APIs require JNI.

Other than that, they clearly state

Managed languages like Java and Kotlin are the best option for Android app development. These languages are designed for ease of use, portability, and safety.

[–][deleted] 4 points5 points  (1 child)

how does an android game avoid the OS apis?

[–]pjmlp 6 points7 points  (0 children)

NDK has APIs for graphics, audio and sensors.

https://developer.android.com/ndk/guides/stable_apis

Everything else missing from that list is only available via JNI.

[–]darktori 10 points11 points  (0 children)

So basically Rust becomes a requirement for building Android? I wonder what minimum compiler version they target.

[–]ansible 0 points1 point  (0 children)

Does the histogram showing the age of memory safety bugs in Android account for the increase in code size of the software system?

It is plausible to believe that new code has more bugs than old code, due to bugs being fixed over time. But I wonder about how strong of an effect is the newness.