An interesting bit of Android's Rust integration: android.googlesource.com/platform/devel. It converts Cargo packages into Blueprint modules integrated into the normal build system. Blueprint is Android's declarative build system implemented on top of ninja. Fits into overall incremental build.
Conversation
Replying to
Question, does this (and/or "Blueprint") create a path to writing Android software without using Gradle?
1
Replying to
The Android Open Source Project builds everything including apps with ninja. The modern approach is the declarative Blueprint system. The legacy approach is the template-based Android.mk build system which was the basis for Blueprint. It's far nicer than gradle...
2
Here's an example of a Rust crate (futures) converted to Blueprint:
android.googlesource.com/platform/exter
Here's a manually written example for a C executable and static library:
android.googlesource.com/platform/exter
This is what it looks like for an app:
android.googlesource.com/platform/packa
I think it's great.
This is an example of an app using the legacy Android.mk-based system:
github.com/GrapheneOS/pla
It's essentially the same thing, but everything gets expanded into an enormous Makefile. Legacy system isn't implemented via make anymore but rather Kati and integrates with the rest.
1
Kati is a reimplementation of GNU make into ninja. AOSP incorporates it in a way that's interoperable with the new declarative Blueprint build system. The old approach was essentially a poor man's declarative build system. The usage is very similar to how they use Blueprint.
2
Show replies

