Skip to content

Graal Native Image #248

@jwharm

Description

@jwharm

Graal Native Image for JDK 24 has experimental support for the FFM API: https://www.graalvm.org/jdk24/reference-manual/native-image/native-code-interoperability/foreign-interface/
It would be nice if java-gi would support this. To make it work, the java-gi bindings generator must generate a GraalVM “ForeignRegistrationFeature” class that registers all downcall and upcall FunctionDescriptiors used in the module.

Notes:

  • Use command-line arguments -H:+UnlockExperimentalVMOptions and -H:+ForeignAPISupport
  • Upcalls in Native Image currently only work on Linux.
  • Custom GObject class registration uses reflection intensively, so that will probably not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions