JavaDoesUSB icon indicating copy to clipboard operation
JavaDoesUSB copied to clipboard

graalvm native support?

Open Liangdi opened this issue 1 year ago • 4 comments

According to the documentation (https://www.graalvm.org/latest/reference-manual/native-image/native-code-interoperability/foreign-interface/), you need to configure ForeignRegistrationFeature, but I don't know how to configure it

Liangdi avatar Jul 03 '24 18:07 Liangdi

GraalVM has many restrictions affecting the Foreign Function and Memory (FFM) API. It neither supports upcalls nor calls to SymbolLookup.libraryLookup(). Unfortunately, they are required for this library. So the GraalVM support for FFM is currently insufficient to run this library on any platform.

manuelbl avatar Jul 04 '24 16:07 manuelbl

@manuelbl The upcoming GraalVM is looking good for the FFM API, is it possible to look into supporting it now? I am using https://github.com/graalvm/graalvm-ce-dev-builds/releases/tag/25.0.0-dev-20250517_0807 to test it.

Syer10 avatar May 18 '25 04:05 Syer10

@Syer10 GraalVM obviously makes progress. I will try to make it work with JavaDoesUSB when I find time.

manuelbl avatar May 19 '25 18:05 manuelbl

Release 1.2.1 introduces minor changes so the library works with GraalVM 25 and higher.

See the enumerate_native for instructions. The example has the reachability metadata for Windows, Linux and macOS required by GraalVM.

manuelbl avatar Sep 13 '25 14:09 manuelbl