https://github.com/jectivex/kanji
Swift/Java interface and bindings for macOS and Linux
https://github.com/jectivex/kanji
Last synced: 10 months ago
JSON representation
Swift/Java interface and bindings for macOS and Linux
- Host: GitHub
- URL: https://github.com/jectivex/kanji
- Owner: jectivex
- License: lgpl-3.0
- Created: 2016-08-30T17:58:35.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-07-12T15:45:06.000Z (over 1 year ago)
- Last Synced: 2024-07-13T17:28:15.222Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 502 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.LGPL
Awesome Lists containing this project
README
Swift Kotlin Android Native Java Interface (Kanji)
=====
A cross-platform (macOS / Android / Linux) bridge from Swift to Java.
See the API documentation:
- KanjiVM: https://www.jective.org/Kanji/documentation/kanjivm/
- JavaLib: https://www.jective.org/Kanji/documentation/javalib/
- KanjiLib: https://www.jective.org/Kanji/documentation/kanjilib/
- KanjiScript: https://www.jective.org/Kanji/documentation/kanjiscript/
- KotlinKanji: https://www.jective.org/Kanji/documentation/kotlinkanji/
To run tests on macOS, install a JDK (e.g., with `brew install openjdk`) and ensure that `$JAVA_HOME` exists, then run:
```shell
swift test -Xlinker -L${JAVA_HOME}/lib/jli -Xlinker -ljli
```
On Linux, run:
```shell
LD_LIBRARY_PATH=${JAVA_HOME}/lib/:${JAVA_HOME}/lib/server/:${JAVA_HOME}/lib/jli/:${LD_LIBRARY_PATH} swift test -Xlinker -L${JAVA_HOME}/lib/ -Xlinker -L${JAVA_HOME}/lib/server/ -Xlinker -L${JAVA_HOME}/lib/jli/ -Xlinker -ljli -Xlinker -ljvm
```
See the [ci.yml](blob/main/.github/workflows/ci.yml) workflow to see how this is done on the CI runners.