How do we use zkgroup? #380
-
I've been trying to figure this out over the past few days and I managed to get it yesterday, but then I deleted the zkgroup file so I could rebuild a fresh one and write instructions to submit in a PR, but now signal-cli refuses to see the zkgroups stuff even when I put the same file back in the same place, I don't understand what's happening. Here are the instructions I made, is there anything I'm missing/getting wrong? ### Use a release build
- Go to https://github.com/signalapp/zkgroup/releases and choose the release of your choice. Download the source code and the "lib" file for your platform (`dll` for Windows, `.so` for Linux and `dylib` for MacOS)
- Place the lib file at `zkgroup/ffi/java/src/main/java/org/`
- Create a zip of the `org` directory and rename it to `zkgroup-java-[VERSION].jar` where `[VERSION]` is in the format `x.y.z`
- Place the jar in `signal-cli/src/main`
### Use the latest build
- Clone the repo and select the branch you wish to build
- Install rust if you haven't already
- Follow the "Setup" part in `OVERVIEW.md`
- Skip the gradlew step and instead make your build, the commands are
- `make android_so # Multiple android platform builds`
- `make server_so # Unknown linux GNU`
- `make mac_dylib # MacOS`
- TODO: What do we do for Windows/dll and iOS?
- Your lib file will be under `zkgroup/ffi/java/src/resources/` copy it to `zkgroup/ffi/java/src/main/java/org/`
- Create a zip of the `org` directory and rename it to `zkgroup-java.jar`
- Place the jar in `signal-cli/src/main` To be clear, I only ever saw it working with the latest build/master + 0.7.1 release dylib file (Because of that version mismatch, that's why I wanted to rebuild it) The command I've been running to test if it works is |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I've realised there's a similar jar in |
Beta Was this translation helpful? Give feedback.
-
I think the cleanest way to solve this is to remove the bundled I've created a wiki page to document this, feel free to extend it ... I don't have a mac to test it: |
Beta Was this translation helpful? Give feedback.
I think the cleanest way to solve this is to remove the bundled
libzkgroup
from thezkgroup-java-*.jar
. then java will search for the library in the system library path.I've created a wiki page to document this, feel free to extend it ... I don't have a mac to test it:
https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal