It is possible I think to enjoy a company’s products without defending everything the company does, especially not the things that benefit the company at the expense of the owners of said products
It is possible I think to enjoy a company’s products without defending everything the company does, especially not the things that benefit the company at the expense of the owners of said products
if you wanna block anyone who criticises apple for their business practices you’ll be blocking a lotta people
i cannot express how much it pains me that a 2DS is now considered retro
Also there’s a telepathic police force that abuses its power every opportunity it gets. Watch out for those guys, they’re real assholes
Good grief, Apple, what took you so long?
No, I’m serious. Why would you ever do that? What features are available to the Java version of the Android API that aren’t available via the NDK? And if those features exist, why is writing the portions of your app that depend on those features in Kotlin and the rest in Rust infeasible?
I don’t see the harm of transpiling parts of the app into JVM to access the full breadth of features
You mean apart from the 5x performance hit?
I’m unaware of anything the Android SDK supports that the NDK doesn’t, and the ndk-rs
crate provides bindings for it. I agree that Rust on Android is not where we’d like it to be yet, especially with regard to familiar interfaces like winit, but transpiling Rust to JVM bytecode is not the solution. Come to that, it’s not the solution to any problem that currently does or (with any luck) will ever exist. Best case scenario, you shift the problem from creating bindings to the NDK to creating much uglier bindings to random Java classes through something JNI-like.
Speaking of the JNI, actually, writing Rust native code that can both be called from and call into to Java/Kotlin/other JVM code via the JNI is actually fairly straightforward.
Transpiling Rust to Java bytecode is a remarkably silly idea and I cannot fathom why anyone would ever do it, except maybe if they really cared about portability.
@sashin@vegnism.social @XTL@sopuli.xyz Alright, I’m back. Survey says: we are, indeed, Android yet!
I found this example repo in my travels: https://github.com/inferrna/hello_world_android_egui
It shows the same demo setup that can be experienced through a Web browser at http://egui.rs, only now as a native-code Android application. To compile it I had to:
rustup target add aarch64-linux-android
cargo apk
) has been deprecated and no longer works (either that or i couldn’t get it working – xbuild is easier anyway)cargo install xbuild
cargo update
the repo since the version of android-activity it ships with is out of date and will crash since my version of Android passed it a null pointer it wasn’t expectingx run --device adb:ADB_ID_GOES_HERE
I did NOT have to:
(I did download them separately as part of a different troubleshooting step, but I deleted them and it continued working. Not sure what to make of this. Not about to reinstall my OS to make sure these steps are reproducible. Please let me know if they are or not!)
UPDATE: It seems egui is not able to accept text input at all – it does not know how to bring up the virtual keyboard when you click a textbox, nor does it accept keyboard input when the virtual keyboard is forced open through third party app nor through a physical USB keyboard. Still more work to be done, but I’m shocked at how much is already possible!
I dunno. I just kinda aimlessly Googled terms related to Android and Rust until I found that link.
The GitHub link in my previous comment shows a basic example of using the egui GUI framework on Android via wgpu. I haven’t found an excuse to play around with it yet, plus getting the Android NDK cross compiler working with Cargo (for crates that compile C code) is a bit of a pain, but I’d assume it works how it says on the tin.
Tell you what, gimme a minute to screw around with this and I’ll report back
We can already write Android apps in pure Rust though. Android apps are allowed to run native machine code – that’s how the Android versions of Genshin Impact, CoD, Fortnite et. al. work – and winit and wgpu support Android NativeActivity as a backend.
Thinking killing animals we don’t sustainably farm for food is bad is pretty uncontroversial
I do tire of over and over explaining to vegans how the natural predation cycle works and that if aliens picked me up off the earth and promised to tend all my injuries and illnesses and give me all the food I could ask for in exchange for a slightly shorter than natural lifespan and as painless a death as they knew how to make it, I’d probably take them up on their offer.
you went to college for calculus and the only job you could find was in law enforcement? damn guess biden’s economy really is shit /s
their
not a him
?
I will throw Databag’s hat into the ring
She asked a question. It was answered.