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.…