Skip to content

Updated sample app instructions #53

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

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,28 @@ docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.2204.main.
docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.2204.main.yaml run test
```

### Examples
### Sample Apps

Sample apps are located in the `Samples/` directory, and they showcase full "roundtrip" usage of the library and/or tools.

#### JavaKit (Swift -> Java)

To run a simple app showcasing a Swift process calling into a Java library you can run:

```bash
make run
./gradlew Samples:JavaKitSampleApp:run
```

Which executes a small Java app (`com.example.swift.HelloSwift`).

#### jextract (Java -> Swift)

To run a simple example app showcasing the jextract (Java calling Swift) approach you can:

```bash
make jextract-run
./gradlew run
./gradlew Samples:SwiftKitSampleApp:run
```

which will run `JavaSwiftKitDemo` sample app.
This will also generate the necessary sources (by invoking jextract, extracting the `Sources/ExampleSwiftLibrary`)
and generating Java sources in `src/generated/java`.

## User Guide

Expand Down