Project Panama. A step closer to native code
summary
Project Panama provides a JNI successor: Foreign Function & Memory API implements the C ABI, supports Windows/Linux/macOS and ARM/M1, and enables downcalls and upcalls plus pointer-backed callbacks. It adds memory session (GC-cleaned off-heap) and a segment allocator for arena-style allocation. jextract is a standalone jlinked tool (~200 MB, uses clang/LLVM and lld) that generates Java bindings and optimized static method handles; variadic C functions get dynamic adapters that are useful but costly (near-JNI performance). C++ works only via type-degrading or extra toolchains.
AI-written summary · about
chapters (10)
- 0:00Introduction and greetings
- 0:46Java Native Interface limitations
- 3:16Foreign Functions and Memory API overview
- 9:17Memory management in Project Panama
- 15:59Key differences from C/C++
- 20:30Performance and static vs dynamic code
- 24:28JExtract: Code generation tool
- 33:39Production use cases and known issues
- 36:48C++ limitations and workarounds
- 39:43Q&A and closing remarks
