-
Notifications
You must be signed in to change notification settings - Fork 67
Update on SwiftJavaDocumentation #372
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
Changes from 7 commits
62ce866
49a4505
dce871f
0ca4e7e
12d5412
77a818b
85babfa
75ac351
321217f
08aed24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,9 +11,26 @@ Please refer to articles about the specific direction of interoperability you ar | |||||||||
|
|
||||||||||
| ### Getting started | ||||||||||
|
|
||||||||||
| TODO: Some general intro | ||||||||||
|
|
||||||||||
| If you prefer a video introduction, you may want to this | ||||||||||
| **SwiftJava** provides Java and Swift interoperability with minimal overhead. It eliminates the complex, error-prone process such as manually compiling Java classes to C headers for native access. With SwiftJava, developers can achieve a flexible, safe, and high-performance connection between the two languages. | ||||||||||
|
||||||||||
| **SwiftJava** provides Java and Swift interoperability with minimal overhead. It eliminates the complex, error-prone process such as manually compiling Java classes to C headers for native access. With SwiftJava, developers can achieve a flexible, safe, and high-performance connection between the two languages. | |
| **SwiftJava** provides a set of tools and libraries to enable Java and Swift interoperability. It allows developers to generate bindings to either language from the other, by using either source generation (for Java consuming Swift code), or by using a combination of Swift macros and source generation (for Swift consuming Java libraries). | |
| The generated code is highly efficient, and less error-prone than manually writing the mappings by hand, and also guarantees memory safety across the boundaries between the languages. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Interoperability promotes** | |
| Reasons why you might want to reach for Swift and Java interoperability include, but are not limited to, the following scenarios: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Incremental adoption of Swift | |
| - Incremental adoption of Swift, in an existing Java codebase |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Access libraries with or without native APIs | |
| - Reuse existing libraries which exist in one ecosystem, but don't have a direct equivalent in the other |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd drop this, as we're just listing why you might want to use this project now
| - Support for ecosystem-specific build tools |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Tools** | |
| SwiftJava is offering a number of core libraries which support the language interoperability: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - JavaKit (Java -> Swift) | |
| - JavaKit (Swift -> Java) - JNI based support library and Swift macros |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - SwiftKit (Swift -> Java) | |
| - SwiftKit (Java -> Swift) - Suport library for Java calling Swift code (either using JNI or FFM) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - swift-java: command line tool | |
| - `swift-java` - command line tool; Supports source generation and also dependency management operations |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Build tool integration: SwiftPM Plugin or Gradle | |
| - Build tool integration: SwiftPM Plugin |
we don't yet have a gradle plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is "from"; we take swift sources as input and generate java; so it's not that the bindings are 'to' swift but that we generate them "from swift sources" 🤔
Maybe this whole sentence needs rewording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok, I was trying to align with the README line 34
How about changing the README to "from" for now, and rewording them both afterwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through the subcommand help message. If I am not mistaken, it should be:
wrap-java: Generates Swift bindings from Java code (Java → Swift).jextract: Generates Java bindings from Swift code (Swift → Java).