No description
Find a file
2023-01-09 14:57:12 +01:00
minmax-java is winning 2023-01-09 14:57:12 +01:00
minmax-rs wrap 2023-01-09 10:47:36 +01:00
rs-wrapper wrap 2023-01-09 10:47:36 +01:00
.gitignore works 2023-01-09 11:01:35 +01:00
Cargo.lock jni 2023-01-09 10:01:17 +01:00
Cargo.toml jni 2023-01-09 10:01:17 +01:00
README.md works 2023-01-09 11:01:35 +01:00

Minmax in Rust with JNI

How to build and run

Prerequisites

  • Gradle
  • Rust toolchain

Compile Rust code

cargo build

Assemble shared library

Copy the shared library in target/debug/librs_wrapper.so (or a .dll on windows) to a known location like the working directory or the system wide library directory.

Build the jar

Use ./gradlew jar or whatever you like I don't know.

Run the program

Maybe it works now. If you get a link error you might need to set the LD_LIBRARY_PATH env var to the path of the shared library (on linux). Or you have to copy it to the systems library directory. Or something else. But it should work.