ffi-bbs-signatures icon indicating copy to clipboard operation
ffi-bbs-signatures copied to clipboard

Implement Java Wrapper for Windows and Linux

Open marc4virono opened this issue 2 years ago • 5 comments

Hi,

How to implement the Java wrapper in Windows and Linux ? I built the library, added the lib to the path. I updated the Java native methods bbs_signatures_bbs.h.

When I used the Bbs Java class, it cannot find the link. I tested on Android it worked but on Linux & Windows I have this error : java.lang.UnsatisfiedLinkError: 'byte[] bbs.signatures.Bbs.bls_public_key_to_bbs_key(byte[], int)' it cannot find the functions in the lib.

What did I miss ?

marc4virono avatar May 10 '22 14:05 marc4virono

Hi again, I tried to compile rust part to be compatible in Java with a native library .dll / .so but I have difficulties to understand why the java.rs is only called for android ?

https://github.com/mattrglobal/ffi-bbs-signatures/blob/b73d17b93721f2e8efa652b9f4827fa0502ceafb/src/lib.rs#L262

What can I do to get the final bbs.dll or bbs.so compatible with Java (jni) ? I tried to remove android target and I got the same error java.lang.UnsatisfiedLinkError.

marc4virono avatar May 11 '22 16:05 marc4virono

Hi, also trying to get this lib usable in Java under Linux, I found the Java feature not enabled by cargo when platform is Linux. Modifying the build.sh this way: cargo build --release --features java will enable the JNI features within the native lib. However running the JUnit tests fails with other errors (58% successful - 18/43)

ngwlf avatar Dec 21 '22 15:12 ngwlf

@ngwlf Did you get anywhere with this? I've hit the same problem.

mcsherrylabs avatar Mar 09 '23 12:03 mcsherrylabs

Or @marc4virono - any further progress?

mcsherrylabs avatar Mar 09 '23 13:03 mcsherrylabs

@ngwlf Did you get anywhere with this? I've hit the same problem.

unfortunately no further.

ngwlf avatar Mar 09 '23 13:03 ngwlf