arsd icon indicating copy to clipboard operation
arsd copied to clipboard

arsd.jni Possible to use D as jni in android studio?

Open Aphexus opened this issue 1 year ago • 1 comments

Do you think it would be possible to use D to write native code in android studio using arsd.jni to interface with kotlin?

Aphexus avatar Sep 09 '24 21:09 Aphexus

Yes, that should be doable. Actually, Android is why I wrote the jni lib in the first place (though I never actually used it for anything beyond a hello world there...) But you can compile to a .so and load it, i did helper programs for it https://code.dlang.org/packages/d_android with generated bindings to the android apis (but be warned, using them leads to BRUTALLY SLOW compile times) and it is years old so might not work anymore but still might help you get something going.

adamdruppe avatar Sep 09 '24 21:09 adamdruppe