adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
529 stars 128 forks source link

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

Open Aphexus opened 2 months ago

Aphexus commented 2 months ago

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

adamdruppe commented 2 months ago

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.