Menu

📰
0

Reddit - Please wait for verification

Java News/Tech/Discussion/etc. No programming help, no learning Java·/u/OddEstimate1627·3 days ago
#1uHa96tf
Reading 0:00
15s threshold

I had an existing JavaFX GUI for robotics visualizations that I wanted to make available to other languages including Python, MATLAB, and C++. This would typically be done in an external process with IPC, but since that introduces a lot of problems and overhead, I tried to create native in-process bindings using the GraalVM Native Image C API and the language-specific C FFI wrappers. Getting an initial demo running was honestly quite painful, but I ended up writing an annotation processor that takes care of all the tedious boilerplate @CEntryPoint wrappers, exception passing, isolate management, and generates matching idiomatic bindings for several languages.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More