Added
Default
trait implemented forJObject
,JString
,JClass
, andJByteBuffer
(#199)Debug
trait implemented forJavaVM
,GlobalRef
,GlobalRefGuard
,JStaticMethodID
andReleaseMode
(#345)ReturnType
for specifying object return types without a String allocation. (#329)
Changed
- The
release_string_utf_chars
function has been marked as unsafe. (#334) - Mark
JNIEnv::new_direct_byte_buffer
asunsafe
(#320) JNIEnv::new_direct_byte_buffer
now takes a raw pointer and size instead of a slice (#351 and #364)JNIEnv::direct_buffer_address
returns a raw pointer instead of a slice (#364)- The lifetime of
AutoArray
is no longer tied to the lifetime of a particularJNIEnv
reference. (#302) - Relaxed lifetime restrictions on
JNIEnv::new_local_ref
. Now it can be used to create a local
reference from a global reference. (#301 / #319) JMethodID
andJStaticMethodID
implementSend
+Sync
and no longer has a lifetime parameter, making method
IDs cacheable (with a documented 'Safety' note about ensuring they remain valid). (#346)JFieldID
andJStaticFieldID
implementSend
+Sync
and no longer has a lifetime parameter, making field
IDs cacheable (with a documented 'Safety' note about ensuring they remain valid). (#346)- The
call_*_method_unchecked
functions now takejni:sys::jvalue
arguments to avoid allocating
aVec
on each call to map + collectJValue
s assys:jvalue
s (#329) - The
From
trait implementations convertingjni_sys
types likejobject
toJObject
have been replaced
withunsafe
::from_raw
functions and corresponding::into_raw
methods. Existing::into_inner
APIs were
renamed::into_raw
for symmetry. (#197) - The APIs
JNIEnv::set_rust_field
,JNIEnv::get_rust_field
andJNIEnv::take_rust_field
have been marked asunsafe
(#219)
New Contributors
- @TobiasDeBruijn made their first contribution in #332
- @chrismooredev made their first contribution in #324
- @xianminx made their first contribution in #350
- @rib made their first contribution in #359
- @kgrech made their first contribution in #355
- @sdeleuze made their first contribution in #337
- @Rodrigodd made their first contribution in #339
- @tomcumming made their first contribution in #308
- @kjvalencik made their first contribution in #320
- @TimeToogo made their first contribution in #351
- @jrose-signal made their first contribution in #318
- @argv-minus-one made their first contribution in #319
Full Changelog: v0.19.0...v0.20.0