Skip to content

Commit 5986822

Browse files
authored
[GSoC] Officially add swift-java project idea (swiftlang#961)
I have been working on a proposal with Mads for a while, and he posted about the idea over here as well: https://forums.swift.org/t/gsoc-2025-jni-mode-for-jextract-swift/79122 This addition is to confirm that I'd be happy to mentor the project if accepted and that it is a project idea fitting the Swift GSoC. This does not yet guarantee acceptance of the project, as it'll have to be weighted against other proposals.
1 parent d8dcfa4 commit 5986822

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

gsoc2025/index.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,39 @@ Strech goals:
390390
- [Si Beaumont](https://github.com/simonjbeaumont)
391391
- [Honza Dvorsky](https://github.com/czechboy0)
392392

393+
### JNI mode for swift-java's source jextract tool
394+
395+
**Project size**: 350 hours (large)
396+
397+
**Estimated difficulty**: Intermediate
398+
399+
**Recommended skills**
400+
401+
- Basic proficiency in Swift.
402+
- Basic proficiency in Java, since the source generator will be emitting both Java and Swift code.
403+
404+
**Description**
405+
406+
The existing [swift-java](https://github.com/swiftlang/swift-java) Java interoperability project currently supports both JNI and Java's new Foreign Function & Memory API's,
407+
however the latter source generator which works by analysis of existing Swift code, and emitting Java "accessors" to these
408+
currently only works with JDK 22+ because it uses FFM for its implementation. It would be possible–and beneficial for platforms
409+
where JDK 22+ is not available–to allow the `jextract` tool also operate in a limited functionality JNI mode.
410+
411+
This project would kickstart the work on a JNI mode for the `jextract` tool, allowing for calling for any Swift APIs
412+
from Java, using these generated Java accessor classes.
413+
414+
**Expected outcomes/benefits/deliverables**
415+
416+
- Provide a new JNI mode for the `jextract`
417+
- Achieve feature parity with the current day FFM mode of jextract
418+
- The project can be stretched to provide more features and continue work on jextract, providing more flexibility in the tool
419+
420+
**Potential mentors**
421+
422+
- [Konrad 'ktoso' Malawski](https://github.com/ktoso)
423+
424+
425+
393426
### Example project name
394427

395428
**Project size**: N hours

0 commit comments

Comments
 (0)