On Monday, 12 December 2022 at 15:03:13 UTC, Adam D Ruppe wrote:
On Monday, 12 December 2022 at 11:17:47 UTC, jni wrote:
It's good. But you did the java bindings by hand or is there a generator in arsd.jni for that too?

It does it automatically. You compile jni.d with `-version=WithClassLoadSupport` and then write a main function that calls `jarToD("path/to/file.jar", "whatever.d.name", "output_directory", JavaTranslatorConfig(true, true, true));`

Or something like that. It has been 3 years lol. But I put some docs in there too

http://arsd-official.dpldocs.info/arsd.jni.jarToD.html

http://arsd-official.dpldocs.info/arsd.jni.JavaTranslationConfig.html


For the C .h files, I used the `dstep` program
https://github.com/jacob-carlborg/dstep/

with a bit of hand edits after.



Hello, friends. I am ready to make my engineering decisions. I have been up and down the d-android repos and I have a firmer grasp as to what the jni actually is, and I presume that it is used in the Android NDK. In the months ago that I opened the NDK I noticed the C files but I did not go in for closer inspection. I have only one more question for you so that I can get to a better engineering decision for the app I will build. Are the differences negligible between using the jni and writing the app in C? Does the NDK provide both the jni and C libraries then you Adam chose to use jni instead of the C or are they together binded in the NDK? eg. The C library uses jni? I know the Android OS uses jni, but I thought the native APIs were native to the OS, not written ontop with the jni.

Reply via email to