Skip to content

Best practice from Rust's HashMap to Java Map? #495

Answered by argv-minus-one
tisonkun asked this question in Q&A
Discussion options

You must be logged in to vote

JNIEnv::new_string is a wrapper around a C JNI function; it's built into the JVM.

Converting between Java and Rust types in general is another story altogether. The way you've done it pretty much is the best practice at this point. Perhaps someone will write some conversion traits and/or a JNI binding generator in the future, but that would be a lot of work.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tisonkun
Comment options

Answer selected by tisonkun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants