Lessons from Mixing Rust and Java: Fast, Safe, and Practical
1–10 of 45 posts
Re: Lessons from Mixing Rust and Java: Fast, Safe, and Practical
#2https://github.com/mozilla/uniffi-rs
You can generate bindings for multiple languages. It supports error handling on both sides and latest versions also support native async integration.
I've used it to reuse the same Rust engine in iOS and Android apps and write native UI.
Re: Lessons from Mixing Rust and Java: Fast, Safe, and Practical
#3Re: Lessons from Mixing Rust and Java: Fast, Safe, and Practical
#4Do not write the bindings manually. Just use the amazing uniffi-rs library from Mozilla. https://github.com/mozilla/uniffi-rs You can generate bindings for multiple languages. It supports error handling on both sides and latest versions also support native async integration. I've used it to reuse the same Rust engine in iOS and Android apps and write native UI. https://github.com/koofr/vault
Re: Lessons from Mixing Rust and Java: Fast, Safe, and Practical
#5Why didn't OP use Panama or the modern Java native APIs which are far better than JNI?
Re: Lessons from Mixing Rust and Java: Fast, Safe, and Practical
#6Why didn't OP use Panama or the modern Java native APIs which are far better than JNI?