Skip to content

Commit e4a8c72

Browse files
committed
Merge remote-tracking branch 'origin' into swift-java-documentation
2 parents 85babfa + 1d20148 commit e4a8c72

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

Sources/SwiftJavaDocumentation/Documentation.docc/SupportedFeatures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Java `native` functions. JavaKit simplifies the type conversions
3333
| Java `abstract class` | TODO |
3434
| Java `enum` ||
3535
| Java methods: `static`, member |`@JavaMethod` |
36-
| **This list is very work in progress** | |
36+
| **This list is very work in progress** | |
3737

3838

39-
### JExtract: Java -> Swift
39+
### JExtract – calling Swift from Java
4040

4141
SwiftJava's `swift-java jextract` tool automates generating Java bindings to Swift sources.
4242

Sources/SwiftJavaDocumentation/Documentation.docc/index.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,19 @@ Please refer to articles about the specific direction of interoperability you ar
1111

1212
### Getting started
1313

14-
**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.
14+
**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 a combination of Swift macros and source generation (for Swift consuming Java libraries).
1515

16-
**Interoperability promotes**
17-
- Incremental adoption of Swift
18-
- Reuse of libraries across languages
19-
- Access libraries with or without native APIs
20-
- Implement performance-sensitive code in Swift
21-
- Support for ecosystem-specific build tools
16+
The generated code is highly efficient and less error-prone than manually mapping, and also guarantees memory safety across the boundaries between the languages.
2217

23-
**Tools**
24-
- Swift Package:
25-
- JavaKit (Java -> Swift)
26-
- Java Library:
27-
- SwiftKit (Swift -> Java)
28-
- Tooling:
29-
- swift-java: command line tool
30-
- Build tool integration: SwiftPM Plugin or Gradle
18+
Reasons why you might want to reach for Swift and Java interoperability include, but are not limited to, the following scenarios:
19+
- Incremental adoption of Swift in an existing Java codebase
20+
- Reuse existing libraries which exist in one ecosystem, but don't have a direct equivalent in the other
3121

22+
SwiftJava is offering several core libraries which support language interoperability:
23+
- `JavaKit` (Swift -> Java) - JNI-based support library and Swift macros
24+
- `SwiftKit` (Java -> Swift) - Support library for Java calling Swift code (either using JNI or FFM)
25+
- `swift-java` - command line tool; Supports source generation and also dependency management operations
26+
- Build tool integration - SwiftPM Plugin
3227

3328
If you prefer a video introduction, you may want to watch this
3429
[Explore Swift and Java interoperability](https://www.youtube.com/watch?v=QSHO-GUGidA)
@@ -42,7 +37,7 @@ which is a quick overview of all the features and approaches offered by SwiftJav
4237
- <doc:SupportedFeatures>
4338

4439

45-
### Source generation
40+
### Source Generation
4641

4742
- <doc:SwiftJavaCommandLineTool>
4843
- <doc:SwiftPMPlugin>

0 commit comments

Comments
 (0)