On Monday, 20 August 2018 at 12:26:25 UTC, Laeeth Isharc wrote:
On Monday, 20 August 2018 at 11:55:33 UTC, Joakim wrote:

Finally, regarding leverage, I keep pointing out that mobile has seen a resurgence of AoT-compiled native languages, but nobody seems to be trying D out in that fertile terrain, other than me.

I did try, but it's not exactly easy to make a complete app in D, even on Android. It would be great if there were some way to automatically wrap the APIs.

Right now, the Android port is more suited for writing some performant libraries that run as part of an existing Android app. The kind of polish you're looking for will only come with early adopters pitching in to smooth out those rough edges.

If we had autowrap for JNI and could dump the types and method prototypes as part of the pre-build process, what would the next stage be to be able to just call Android APIs from D and have them work? JNI isn't that bad (I know it's deprecated) and I used it already from D in a semi-wrapped way. So I wonder how much more work it would be to have autowrap for JNI. I didn't use reflection on the Java side because I wasn't wrapping that much code. Are there XML descriptions of Android APIs you could use to generate wrappers?

For example, could we make something like this for D?
https://github.com/opencollab/giws
https://en.wikipedia.org/wiki/GIWS_(software)

The above requires the user to specify the types in XML, but I guess you can dump them via reflection. I have done some work on wrapping given the types in the internal code below (which won't build by itself). It was written in a hurry and I didn't know Java, D, or JNI very well at the time:

https://github.com/kaleidicassociates/import-java-d

Reply via email to