FFM is rather good, comparing to JNI
The API of FFM is minimal and a little ugly for a reason - it really should not be used without
jextract
(or other code-generator) - with it, the API looks more or less nice and strait-forward, I would say
FFM API is low-low-level API, and
jextract
generated API is just low-level API
In future (I suppose) there will be better APIs for some stuff. AFAIK even now there talks there regarding mapping struct to `record`s. And a lot more sugar could be added - though, I believe it would be mostly on
jextract
side (and it's expected)
Still, with Kotlin we could do better already, but it's a really hard task (
cinterop
is not a good API either)