<div dir="ltr"><div dir="ltr"><div dir="ltr">See <a href="https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/foreign-interface/">https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/foreign-interface/</a></div><div dir="ltr"><br></div><div>Glavo</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 4, 2024 at 9:55 AM tison <<a href="mailto:wander4096@gmail.com">wander4096@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
This can be a bit out of scope, but I wonder if there is a plan to<br>
support FFM in GraalVM Native Image.<br>
<br>
The original issue is that I want to resolve "~username" to the real<br>
absolute path, and I don't find anything that can achieve this in JDK.<br>
<br>
Instead, it's supported in POSIX with getpwnam_r and pw_dir. So, I'd<br>
like to use FFM to access these functions (instead of JNI and<br>
distribute multiple classifiers for many platforms).<br>
<br>
Then, another object I'd like to achieve is packaging my lib into a<br>
GraalVM Native Image, so it should be considered if FFM will be<br>
supported in that technology in a future version.<br>
<br>
Alternatively, if JDK provides interfaces to support more POSIX<br>
manipulations, it would be more than desired.<br>
<br>
Looking forward to your feedback.<br>
<br>
Best,<br>
tison.<br>
</blockquote></div>