JavaCAN icon indicating copy to clipboard operation
JavaCAN copied to clipboard

Project Panama

Open pschichtel opened this issue 4 years ago • 5 comments

It would be nice to have a version of JavaCAN that uses Project Panama for SocketCAN and epoll interaction instead of JNI, making this a pure Java project.

jextract might come in handy for generating the low-level glue-code: http://cr.openjdk.java.net/~mcimadamore/panama/jextract_distilled.html

pschichtel avatar Mar 26 '22 18:03 pschichtel

BTW have you thought of giving a try to jnr-ffi or JNA? I think both allow to cut JNI part with some performance sacrifices. I saw it used with dbus (for unix sockets) and systemd (to call its library). Both work with present releases of JVM.

splatch avatar May 12 '22 14:05 splatch

Yes, both would work but face the exact same challenge as project panama.

pschichtel avatar May 12 '22 15:05 pschichtel

labeling this for the next major version. I don't think it makes sense to do this without rethinking some API decisions.

pschichtel avatar Feb 28 '24 18:02 pschichtel

Java 22 makes this Project Panama stable: https://openjdk.org/projects/jdk/22/

pschichtel avatar Mar 19 '24 15:03 pschichtel