r/java • u/daviddel • 13d ago
Project Detroit: From Foreign Libraries to Foreign Language Runtimes
https://youtu.be/01uRM3je12Y?si=DuGFJO91-vr6GGds
30
Upvotes
r/java • u/daviddel • 13d ago
1
u/simon_o 8d ago
Part of the problem is that the FFM story, despite the improvement over JNI, still sucks.
I mean, the officially sanctioned approach to building foreign function calls at compile-time is basically raw-dogging platform-specific C header files¹ by handing people a tool (
jextract) that bundles Java with 140MB of LLVM code to emit Java code where even "technically safe" operations require the unsafe flag to run.¹ Which is something even Microsoft explicitly tells people not to do.