Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.05 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.05 KB

Swift Kotlin Android Native Java Interface (Kanji)

A cross-platform (macOS / Android / Linux) bridge from Swift to Java.

See the API documentation:

To run tests on macOS, install a JDK (e.g., with brew install openjdk) and ensure that $JAVA_HOME exists, then run:

swift test -Xlinker -L${JAVA_HOME}/lib/jli -Xlinker -ljli

On Linux, run:

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 workflow to see how this is done on the CI runners.