Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 967 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 967 Bytes

(Rust's NSFW detection library) adapter for Java

(I didn't come up with a pretty name. It is not a standalone tool by now, so I'm not sure if it needs its own name at all)

It is a part of ren-java-backend

How to run?

You will probably need Rust installed, see rust language installation, you'll also need java, at least, openjdk-11 on linux, as far as I could tell, then you could:

  • cargo install cargo-binstall and then cargo binstall just
  • or instead just cargo install just

Now that everything's ready, you can run

just release-daemon &
just release-java

To include this in your Java code, copy java_code/NsfwPredictor.java to your repo, compile Rust, unleash the daemon with just release-daemon, then add LD_LIBRARY_PATH which is path to your compiled .so library to env variables for your Java for it to know where to find the library.