Haven’t android apps been compiled to native code since like 2012? (I actually don’t know, I left android a while ago and stopped caring what they do)
Haven’t android apps been compiled to native code since like 2012? (I actually don’t know, I left android a while ago and stopped caring what they do)
All that said.
Rust doesn't have a GC so it'd (likely) have a lower memory consumption and could possibly be lighter on the CPU.
Native compilation helps mainly with startup time and memory consumption. It's not exactly great for runtime performance as it takes away some key optimizations.
Another benefit of rust assuming you are distributing binaries is you'll be able to use the latest version of Rust rather than being pinned to older versions of the SDK with partial support based on the whims of google.
Android is one platform: android. I thought rust worked across multiple operating systems.
>Rust doesn't have a GC so it'd (likely) have a lower memory consumption and could possibly be lighter on the CPU.
So what? I have never used G.C.
>Native compilation helps mainly with startup time and memory consumption. It's not exactly great for runtime performance as it takes away some key optimizations.
That is fair I suppose
I think the main benefit of rust/c++/ndk on android is that I can just port desktop programs and I don't have to learn android's java/kotlin and sdk.
Operating systems, not architectures. You'd have to cross-compile your application 4 times if you want to support all arms and x86s.
> I think the main benefit of rust/c++/ndk on android is that I can just port desktop programs and I don't have to learn android's java/kotlin and sdk.
It's not "just" port desktop programs. Android doesn't even use glibc.
Android has supported native code in apps for a long time via the Android NDK, mainly to enable game development. The Android team seems to hate the NDK, but the alternative is to have no games on the platform, so they can't simply kill it.
> ...[native] ... It's not exactly great for runtime performance as it takes away some key optimizations.
In theory a JIT might produce better runtime performance than AOT compiled code, but in practice that usually turns out as wishful thinking.
In practice, people should learn how Android actually works.
JIT + AOT with PGO data shared across all Android devices on the planet, gets the best of both worlds.
Kotlin is just Java with extra steps.
But anyway I have used it. Didn't understand why it existed then. Still don't.
All these weird languages and UI frameworks where you write hundreds of lines of code just do simple UI layouts, no thanks.