All Versions
18
Latest Version
Avg Release Cycle
102 days
Latest Release
883 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v0.20.0 Changes
October 17, 2022โ Added
- 0๏ธโฃ
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)
- 0๏ธโฃ
-
v0.19.0 Changes
January 24, 2021โ Added
AutoArray
and genericget_array_elements()
, along withget_<type>_array_elements
helpers. (#287)size()
method toAutoArray
andAutoPrimitiveArray
. (#278 / #287)discard()
method toAutoArray
andAutoPrimitiveArray
. (#275 / #287)
๐ Changed
- โ Removed AutoPrimitiveArray::commit(). (#290)
AutoByte/PrimitiveArray.commit()
now returnsResult
. (#275)- Removed methods get/release/commit_byte/primitive_array_{elements|critical}. (#281)
- Renamed methods get_auto_byte/long/primitive_array_{elements|critical} to get_byte/long/primitive_array_{elements|critical}. (#281)
-
v0.18.0 Changes
September 23, 2020โ Added
JNIEnv#define_unnamed_class
function that allows loading a class without
specifying its name. The name is inferred from the class data. (#246)SetStatic<type>Field
. (#248)TryFrom<JValue>
for types inside JValue variants (#264).- Implemented Copy for JNIEnv (#255).
repr(transparent)
attribute to JavaVM struct (#259)
๐ Changed
- ๐ฑ โ ๏ธ Switch from
error-chain
tothiserror
, making all errorsSend
. Also, support all JNI errors
in thejni_error_code_to_result
function and add more information to theInvalidArgList
error. (#242)
-
v0.17.0 Changes
June 30, 2020โ Added
- ๐ Get/ReleaseByteArrayElements, and Get/ReleasePrimitiveArrayCritical. (#237)
-
v0.16.0 Changes
February 28, 2020๐ Fixed
- ๐ Java VM instantiation with some MacOS configurations. (#220, #229, #230).
-
v0.15.0 Changes
February 28, 2020โ Added
- ๐ท Ability to pass object wrappers that are convertible to
JObject
as arguments to the majority of JNIEnv methods without explicit conversion. (#213) JNIEnv#is_same_object
implementation. (#213)JNIEnv#register_native_methods
. (#214)- ๐ท Conversion from
Into<JObject>
toJValue::Object
.
๐ Fixed
- Passing
null
as class loader todefine_class
method now allowed according to the JNI specification. (#225)
- ๐ท Ability to pass object wrappers that are convertible to
-
v0.14.0 Changes
October 31, 2019๐ Changed
- ๐ Relaxed some lifetime restrictions in JNIEnv to support the case when method, field ids; and global references to classes have a different (larger) lifetime than JNIEnv. (#209)
-
v0.13.1 Changes
August 22, 2019๐ Changed
- ๐ Various documentation improvements.
-
v0.13.0 Changes
July 05, 20190.13 brings major improvements in thread management, allowing to attach the native threads
permanently and safely;Executor
for extra convenience and safety; and other
๐ improvements and fixes.๐ โ ๏ธ If your code attaches native threads โ make sure to check the updated documentation
๐ of JavaVM to learn about the new features!โ Added
JavaVM::attach_current_thread_permanently
method, which attaches the current
thread and detaches it when the thread finishes. Daemon threads attached
withJavaVM::attach_current_thread_as_daemon
also automatically detach themselves
when finished. The number of currently attached threads may be acquired using
JavaVM::threads_attached
method. (#179, #180)Executor
โ a simple thread attachment manager which helps to safely
๐ execute a closure in attached thread context and to automatically free
created local references at closure exit. (#186)
๐ Changed
- 0๏ธโฃ The default JNI API version in
InitArgsBuilder
from V1 to V8. (#178) - Extended the lifetimes of
AutoLocal
to make it more flexible. (#190) - 0๏ธโฃ Default exception type from checked
java.lang.Exception
to uncheckedjava.lang.RuntimeException
.
๐ป It is used implicitly whenJNIEnv#throw
is invoked with exception message:
๐ปenv.throw("Exception message")
; however, for efficiency reasons, it is recommended
to specify the exception type explicitly and usethrow_new
:
๐env.throw_new(exception_type, "Exception message")
. (#194)
๐ Fixed
-
v0.12.3 Changes
May 24, 2019