On Tuesday, 17 December 2019 at 18:08:07 UTC, jmh530 wrote:
On Tuesday, 17 December 2019 at 17:41:46 UTC, bachmeier wrote:
I had no idea that existed. That should really be promoted. There might be a lot of interest.

First commit was only 8 days ago [1]. I'm sure there will be a bigger announcement when it's ready.

If I announce lol

but yeah, I just started this a couple weeks ago. The thing that delayed me on the android project was the android build system and IDE, it took me FOREVER to figure out just how to get my code actually running there. (That's why I'm trying to simplify it to just running `android-dub-build path/to/android/studio/project` for the future).

Then I got to actually look at the interop and my original goal was simply to forward the JNI stuff to a regular D function more easily.... then I realized jni lets you do so so so much more and I went a little nuts.

What you see in there already is kinda incredible: you can `auto a = new SomeObjectFromJava();` and it... works. When I started, not in my wildest dreams did I expect to actually have a natural constructor for the foreign language object but here we have it.

So pretty cool stuff. Though I can't make any promises about performance and debugability. I'm gonna try to do load-time checks of signatures and I expect that will help, and speed relies on how JNI does it and idk how much that is (though things like using `wstrings` slicing the chars should help, it is still possibly an arbitrary translation layer) but it is still probably not going to be amazing; the IDE will just see it as an opaque blob I think.

but my jni experiments have so far pleasantly surprised me, so maybe it will again.

Reply via email to