From native code gems to Java treasures with jextract
summary
Project Panama’s Foreign Function and Memory API is final in JDK 22 and jextract automates bindings: it parses C .h files and emits Java FFM code that calls native libs. Demos show a C time function returning correct time, a Python image generator producing a file, an OpenGL teapot rendering after adding Mac compile flags, and a Rust hello_world exposed via cbindgen and callable from Java. Warnings appear for unresolved types but jextract parses .h and generates Java bindings and offers trace downcalls to debug native calls.
AI-written summary · about
chapters (7)
- 0:00Introduction to jextract
- 4:44Time translator demo
- 12:24Python image maker demo
- 16:59OpenGL teapot demo
- 26:25Rust hello world demo
- 29:48FFM API and jextract summary
- 31:56Resources and next steps
related talks
42mFrom native code gems to Java treasures with jextract
01h 04mProject Panama Unleashing Native Libraries
36mA Promising Future for using Native Libraries in the Java World
29mEasily Leverage Native Functions with Project Panama from Java
55mJava 19 Project Panama 4 Newbies
01h 01mJava Enable Preview: Foreign Function and Memory Interface
47mInterconnecting Java and Native Code with the FFM API
43mPanama Update
