FFM goes final!

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Oct 20 11:16:49 UTC 2023


Hi,
As some of you might know, JEP 454 has landed in the JDK repository and 
the FFM API is no longer a preview API :-)

A binary snapshot containing the Java 22 changes is available here:

https://jdk.java.net/22/

And, a jextract branch to go with it is also available here:

https://github.com/openjdk/jextract/tree/jdk22

Over the last few months the focus has been on further polishing the 
rough edges of the API. We have just published a PR [1] which enhances 
the "critical" linker option so that heap segments can be passed 
directly to native code (w/o copy). We believe this further enhancement 
should bring some benefits for legacy APIs that are "stuck" dealing with 
byte arrays, but need to interop with native code.

We have also been working on the tooling aspect of restricted methods, 
adding support for restricted method warnings in javac [2] and also 
adding better javadoc support for restricted methods [3].

It is also nice to see the first attempts at using FFM within the JDK 
itself [4], we hope this trend is one that will continue.

Of course, finalizing the API doesn't mean we're done (is there ever 
such a thing?). We are actively exploring ways to model foreign data 
with records, and we plan to make more progress on improving the startup 
of FFM clients. More longer term, there's a lot of interesting synergies 
to look forward to, from structured arenas (Loom) to better support for 
unsigned types (Valhalla). Plenty of exciting stuff to work on still!

We'd also like to take a moment to thank all of you. It is a privilege 
to be in a position to improve the Java platform, and one that we do not 
take lightly. But, without your help, all our efforts will be in vain. 
So we're very grateful for the feedback you have provided along the way, 
in every shape or form, be it a bug report, a benchmark or even just a 
"git checkout" to see what's up. You are the pulsating heart of what we 
call Java. Please keep it up, and keep helping us making Java a better 
language/platform.

Cheers
Maurizio

[1] - https://git.openjdk.org/jdk/pull/16201
[2] - https://git.openjdk.org/jdk/pull/15964
[3] - https://github.com/openjdk/jdk/pull/16188
[4] - https://git.openjdk.org/jdk/pull/15476




More information about the panama-dev mailing list