witnet / vrf-rs

Verifiable Random Function (VRF) library written in Rust
MIT License
90 stars 37 forks source link

how java developer to use it vrf.rs? #22

Closed yanyanho closed 3 years ago

aesedepece commented 3 years ago

Hi @yanyanho.

vrf-rs is a Rust library. If you want to make it work within your Java environment, my recommendation is to google for "call Rust from Java".

Basically you will need to "wrap" or "bind" the Rust library or its compiled binary with your own Java code that will act as a programming interface that can be used by any other Java program. I think that's made possible by JNI or JNA.

Sorry that I can't be of more help than that. It's been years since I last wrote a line of Java, so I'm not that familiar anymore and can't really point you to a more detailed tutorial on how to do this.

yanyanho commented 3 years ago

Thanks very much . I have use jna to invoke vrf-rs. Together with the vrf.sol, it works successfully. Thanks your great work. It is our java implementation https://github.com/yuanmomo/vrf-rust-jna