Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JNI mode for jextract-swift #25

Open
DougGregor opened this issue Sep 30, 2024 · 0 comments
Open

JNI mode for jextract-swift #25

DougGregor opened this issue Sep 30, 2024 · 0 comments
Labels
jextract-swift Issues related to jextract-swift

Comments

@DougGregor
Copy link
Member

Currently, jextract-swift emits Java code that uses the Foreign Function & Memory API introduced in JDK 22. For environments with older Java versions, we should consider introducing a mode that instead uses JNI. The produced Java classes could have the same interfaces, but any methods implemented by Swift would be declared as native in Java and implemented via a @_cdecl stub in Swift (similar to what we do with the @ImplementsJava macro).

@ktoso ktoso added the jextract-swift Issues related to jextract-swift label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jextract-swift Issues related to jextract-swift
Projects
None yet
Development

No branches or pull requests

2 participants