Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 917 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 917 Bytes

io_uring Kotlin bindings

requirements

Run tests

./gradlew test

Compile manually

Run the following from kotlin/ directory:

  • Compile the .kt file to a class, so we can later use javah on it: kotlinc-jvm .

  • Generate C header files: javah -o iouring/native/io_uring_kotlin.h iouring.IOuringNativeBindings

  • Compile JNI files from: gcc -fPIC iouring/native/io_uring_kotlin.c -shared -o iouring/native/libio_uring_kotlin.so -I $JAVA_HOME/include/ -I $JAVA_HOME/include/linux/ -Wall -O2 -D_GNU_SOURCE -luring

  • Compile the .kt file to a JAR: kotlinc-jvm . -include-runtime -d iouring/IOuringNativeBindings.jar

  • Run: java -jar -Djava.library.path=iouring/native/ iouring/IOuringNativeBindings.jar 1337