It would be absolutely amazing if Google came out with a mechanism for building native apps in, say, Rust.
It would be absolutely amazing if Google came out with a mechanism for building native apps in, say, Rust.
To an extent, that partially exists in the form of Android NDK, but that's not really a full solution. If and when Google makes it possible to easily create your entire app natively (with a clean C API), then you ought to see a surge of libraries/toolkits/frameworks coming out that will enable you to write Android apps in most common languages (Rust likely included).
It adds very little value over Java + NDK on Android.
The Android native widgets aren't supported, rather emulated via QML and only the most well known ones.
For the majority of Android APIs no support is provided, offering no advantage over we having to write our own JNI wrappers.
Also iOS and Windows Phone support are even worse than Android.
If I have to spend time writing bindings to OS APIs and faking UI widgets for each OS I am targeting, then the framework is not doing anything to help me, rather on the contrary.
As extra info, on 5.3 some of the C++ widgets render on Android as if it was a desktop. Just try to use a Qr file selector on your phone.
Apparently this has worked so well that 5.6 is going to have yet another re-write of the controls.
The last years the NDK support has always been seen as something to help bring "legacy" code from other platforms, be consumed from Java to help speed up some algorithms, games.
In fact, apparently they are now closing down the door to rogue developers that used to link to unofficial platform libraries.
If you look at the Tango SDK, apparently they have a C API to some platform APIs, however when one digs into them, they are wrappers to functionality implemented in Java.
While the NDK is hard to use, it is enough to enable alternate modes of Android development. For instance with Unity you can develop and Android app using C# and the Unity graphical editor. That's a very powerful option for certain classes of apps.
Having an API that is easy to use would really open up the ecosystem. Also, having much faster, machine targeted code (ie: compiled with CPU architecture and model specific optimizations and instructions) in C, C++, Rust, Go, etc. would mean better performance and less battery usage in some apps, which overall would translate to a superior user experience.
Only for users of devices that the dev bothered to put out binaries for. I guarantee you most devs that use the NDK are not building for all 8 ABIs that the NDK supports. ARMv7-neon may be the most common arch but it is far, far from the only one.
Also they could in theory do escape analysis to do stack allocation.
And assuming Google does indeed keep up with Java versions, eventually value types will be supported.
The only way they are going to move away from all the framework code they have invested in Java (the language) is if they create a common runtime like WinRT or Objective-C runtime.
However, it is quite telling that the Android team doesn't even bother to add Go or Dart support to the NDK.
It's java the language we are talking about. Basically kotlin or dart targeting the jvm.