how java developer to use it vrf.rs?
yanyanho opened this issue · 2 comments
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.
- Maybe this could be a good example: https://github.com/drrb/java-rust-example
- This could also be helpful when generating the binding: https://github.com/Dushistov/flapigen-rs
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.
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