duchess-rs / duchess

Silky smooth Java-Rust interop

Home Page:https://duchess-rs.github.io/duchess/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heads up for planned jni-sys updates

rib opened this issue · comments

Wasn't sure whether to open a discussion for this, but essentially just wanted to make sure to give a heads up here that I've been chipping away at some maintenance chores for jni-sys and based on issues I've seen while working on the jni crate I was planning a few semver breaking changes.

It'd be good if you can take a look at the 'Release 0.4' milestone here: https://github.com/jni-rs/jni-sys/milestone/1

The two notable changes are:

  1. making jboolean an alias for bool: ref jni-rs/jni-sys#19, jni-rs/jni-rs#400 (comment) and jni-rs/jni-sys#23
  2. Turning JNINativeInterface + JNIInvokeInterface_ into unions that namespace function pointers by the JNI version they were added (and remove the misleading Option wrappers), ref: jni-rs/jni-sys#28 and jni-rs/jni-sys#25

The latter change in particular will likely involve boilerplate changes in duchess but at least as far as the jni crate goes I'm glad I looked at this this since it has highlighted several places where the jni crate was using > 1.1 functions without checking the version at runtime.