New candidate JEP: 434: Foreign Function & Memory API (Second Preview)
Gavin Ray
ray.gavin97 at gmail.com
Fri Oct 28 19:58:37 UTC 2022
Maurizio,
> *Hi Gavin, as soon as the PR [1] is integrated, we will make a jextract
> build available with it.*
Awesome, really looking forward to this!
> *But, we're also exploring interim ways for developers to more easily
> build jextract, by "bootstrapping" the jextract 20 build with the 19
> binary.*
> > *After all, the big issue when building jextract is getting the correct
> libclang dependency - but that doesn't change across jextract version.*
Building the JDK is definitely the most time-consuming/laborious part.
(Note: if anyone else reading this winds up wanting to do it, I put
together a Dockerfile which installs all deps + will build the JDK
automatically for you)
https://gist.github.com/GavinRay97/778dd5c511030820020897568b63ee7f
At least for the LLVM toolchain, it's nice that you can use the shell
script they provide and give it a version number, or copy the test from the
jextract Github Action workflow here:
https://github.com/openjdk/jextract/blob/73e408ec3f15fe1e615eeca434c2ce54627adeab/.github/workflows/test.yml#L72-L78
> *So, stay tuned, we might have more news soon!*
My ears will be peeled =)
On Fri, Oct 28, 2022 at 2:11 PM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> Hey Duncan,
> Note that we do have jextract binaries available:
>
> https://jdk.java.net/jextract/
>
> This works against a vanilla JDK 19.
>
> When the first JDK 20 EA build with the new FFM API will come out, the
> above page will be updated, and a link to jextract 20 will be added.
>
> The Panama binary download page you indicated is effectively obsolete, and
> it should probably be removed, to avoid confusion.
>
> Maurizio
> On 28/10/2022 17:37, Duncan Gittins wrote:
>
> Continuing the theme of Gavin's request, I think you might get more people
> to try out jextract and Panama if there were easy to find download links in
> https://jdk.java.net/panama/
> <https://urldefense.com/v3/__https://jdk.java.net/panama/__;!!ACWV5N9M2RV99hQ!NwW3xcoQINXDkZUYrgkilaKazXBg7Lbny12740ULMd93Kt9K294BZxGybUuFG_wLac9iDuQ8pzIdwG8Os7Vqo-fi_I3YxzoF$>
> for versions aligned the shipped JDK 17/18/19.
>
> This means a developer could try samples for the JDK version they already
> have installed without needing to build either JDK or jextract themselves.
> Hopefully it only needs posting every 6 months.
>
> Kind regards
>
> Duncan
>
>
>
> On Fri, 28 Oct 2022 at 00:56, Gavin Ray <ray.gavin97 at gmail.com> wrote:
>
>> Hooray!
>>
>> By any chance, will there be a new release of the Panama 20ea JDK and
>> jextract binaries as well?
>> I've had quite some difficulties getting jextract on 20 built and it'd be
>> swell to rebase some of the work I've done on the more recent API changes.
>>
>> On Thu, Oct 27, 2022 at 2:30 PM Mark Reinhold <mark.reinhold at oracle.com>
>> wrote:
>>
>>> https://openjdk.org/jeps/434
>>>
>>> Summary: Introduce an API by which Java programs can interoperate with
>>> code and data outside of the Java runtime. By efficiently invoking
>>> foreign functions (i.e., code outside the JVM), and by safely accessing
>>> foreign memory (i.e., memory not managed by the JVM), the API enables
>>> Java programs to call native libraries and process native data without
>>> the brittleness and danger of JNI. This is a preview API.
>>>
>>> - Mark
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20221028/625a4626/attachment.htm>
More information about the panama-dev
mailing list