
Rust compiler added to Android tree - ndesaulniers
https://android.googlesource.com/toolchain/rustc/
======
_bxg1
Can someone familiar with the Android ecosystem elaborate on what exactly this
means? Does it mean you get rustc automatically when you download the Android
SDK? Does it imply any particular level of support? How many other languages
have this status?

~~~
blaisio
This happens a lot on hackernews, and frankly it's really annoying. People
post a link to some random thing like this, and it gets upvoted because people
don't click on the link, they just are excited about the title. A lot of
times, the title doesn't even mean anything. Hackernews != Twitter.

</grumpy> I'm going to get some more coffee.

~~~
tosh
hn is one of the few places on the web with a community that notices changes
like these and that can contextualize them just-in-time.

------
mmastrac
Pretty wild how many tools are required to get a hermetic Android build:

[https://android.googlesource.com/toolchain/](https://android.googlesource.com/toolchain/)

edit: this just means that Android developers can now include Rust-language
components in Android itself.

~~~
matthewbauer
I don't think these are all necessarily required. At least I would be very
very surprised if both avr-libc, mingw, and go were needed.

~~~
mmastrac
For avr-libc, probably this:
[http://tool.oschina.net/uploads/apidocs/android/guide/topics...](http://tool.oschina.net/uploads/apidocs/android/guide/topics/usb/adk.html)

Unsure about mingw/go, but they are likely deps for some Android ecosystem
project.

~~~
jsty
Looks like go is mostly used in a graphics package (platform_external_skia):

[https://github.com/search?utf8=%E2%9C%93&q=org%3Aaosp-
mirror...](https://github.com/search?utf8=%E2%9C%93&q=org%3Aaosp-
mirror+language%3AGo&type=Code&ref=advsearch&l=Go&l=)

------
summerlight
1\. A large fraction of Garnet (low level components of Fuchsia) is written in
Rust.
([https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master...](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/garnet/public/rust/))

2\. Fuchsia seemingly supports Android apps
([https://9to5google.com/2019/01/02/android-runtime-app-
suppor...](https://9to5google.com/2019/01/02/android-runtime-app-support-
fuchsia/)).

3\. For 1 + 2, Android may need to include and compile a part of Fuchsia for
interop.

My guess is that this addition is mostly for supporting Fuchsia, rather than
using Rust directly in Android.

------
milky2028
It's not too farfetched to think that some Rust code might be used in Android
itself. Google already uses Rust in ChromeOS to build the Linux VM.

------
smitty1e
Rusty 'Droids: no longer strictly a Star Wars thing.

------
mtgx
Microsoft is also considering it for some Windows components as 70% of Windows
bugs are memory-related:

[https://msrc-blog.microsoft.com/2019/07/16/a-proactive-
appro...](https://msrc-blog.microsoft.com/2019/07/16/a-proactive-approach-to-
more-secure-code/)

I wonder if Google is adding support, because it's also considering replacing
the OpenSSL-forked BoringSSL with the Rustls crypto library:

[https://news.ycombinator.com/item?id=20480277](https://news.ycombinator.com/item?id=20480277)

That would be pretty cool, although I wonder if they shouldn't opt for a Noise
Rust library instead:

[https://github.com/mcginty/snow](https://github.com/mcginty/snow)

