• GSoC 2025 Showcase: Extending Swift-Java Interoperability This is the second post in our series showcasing the Swift community’s participation in Google Summer of Code 2025. • Learn more about the projects and work accomplished: - Bringing Swiftly support to VS Code - Extending Swift-Java Interoperability (this post) - Improved code completion for Swift - Improved console output for Swift Testing Each GSoC contributor has shared a writeup about their project and experience in the program on the Swift forums. • Today’s featured project improved interoperability between Swift and Java, contributed by Mads Odgaard. • Mads recently presented on this project at the Server-Side Swift conference: Expanding Swift/Java Interoperability, and you may have noticed it in action in the recent Swift.org blog post: Announcing the Swift SDK for Android! • To learn more, you can read the full post on the Swift forums. • JNI mode for SwiftJava interoperability jextract tool My name is Mads and I am excited to share with you what I have been working on for Swift/Java interoperability over the summer with my mentor Konrad Malawski for Google Summer of Code 2025.

Article Summaries:

  • In the second installment of the Swift community’s Google Summer of Code 2025 showcase, Mads Odgaard reports on extending Swift‑Java interoperability. The project adds a JNI mode to the swift‑java jextract tool, which previously generated Java bindings only for the Foreign Function and Memory API (FFM) requiring JDK 22+. The new mode produces Java wrappers that call Swift code via native methods, enabling use on platforms such as Android. It also adds support for Swift enums and protocols, surpassing the original feature set. The updated tool simplifies generating Java bindings for Swift libraries, broadening cross‑platform integration possibilities.

Sources: