CppSharp icon indicating copy to clipboard operation
CppSharp copied to clipboard

Support for GeneratorKind.Java

Open rkeelan-shs opened this issue 3 years ago • 1 comments
trafficstars

Is there any interest in adding support for generating JNI wrappers? I've begun working on a Java generator, but given how long ago GeneratorKind.Java was added, and the existence of many other JNI-generating projects (e.g., https://github.com/bytedeco/javacpp), I'm not sure if you guys think that's a feature that would even be worth pursuing.

rkeelan-shs avatar Apr 04 '22 12:04 rkeelan-shs

Hey, I think this would be valuable.

FIY I worked on Java support as part of Embeddinator project a long time ago as you said, I opted to use JNA at the time which worked fine, but JNI should work fine as well.

You can check that code here: https://github.com/mono/Embeddinator-4000/tree/main/binder/Generators/Java

That work was not meant as a general purpose C++ binding system, so I dunno how useful it will be to you.

As long as the code is well-tested then I am fine with merging it, feel free to send some PRs.

tritao avatar Apr 04 '22 15:04 tritao