v0.22
-
Several aliases for
JuliaResult
have been added so they can be more easily returned from an exported funtion. -
The
JuliaResultExt
andJuliaResultExt
extension traits have been added to expose methods to leak or root a result. -
It's no longer possible to spawn a multithreaded runtime, it must be started. Spawning has been removed to avoid issues due to adopting threads that live longer than the runtime thread.
-
The multithreaded runtime uses scoped threads internally, this allows closures to reference non-static data and ensures the adopted threads have exited before the runtime thread, but requires calling
MtHandle::spawn
to spawn a new thread. -
Support for Julia 1.6 - 1.9 (pre-LTS versions) has been dropped.
-
Version features have been removed, the appropriate version is detected at compile time and propagated automatically.
-
The
Executor
,AsyncTask
, andPersistentTask
traits no longer useasync_trait
. To migrate existingPersistentTask
s, remove theasync_trait
-annotation.AsyncTask
s now takeself
by value, so to migrate them remove the annotation and change&mut self
inrun
toself
. -
The async runtime uses async closures for async scopes, and requires using at least Rust 1.85. The
AsyncTask
trait is implemented for all async closuresAsyncFnOnce(AsyncGcFrame) -> T
, so async closures can be used instead of implementingAsyncTask
. The methodAsyncGcFrame::relaxed_async_scope
has been removed, async closures correctly handle the lifetime requirements. -
ManagedRef
has been renamed toManagedWeak
.Managed::as_ref
has been deprecated in favor ofManaged::as_weak
.<Managed>Ref
types have been renamed toWeak<Managed>
. -
The
into_weak
method has been added toWeakManaged
which converts an arbitraryWeakManaged
to a specificWeak
type. -
The diagnostics feature has been removed, custom diagnostics are enabled by default.
-
The environment variables
JLRS_CORE_REVISION
,JLRS_CORE_REPO
,JLRS_CORE_VERSION
, andJLRS_CORE_NO_INSTALL
can be used to override the version of JlrsCore that is used. -
If a custom version of JlrsCore is requested, the requested version is installed before it is loaded.
-
Methods that call a Julia function and track the arguments have been removed.
-
The MSRV has been increased to 1.85.
-
The closure in scopes is now taken as an
impl trait
to get rid of the (unnameable) generic, and the return type has been restored as a generic parameter. -
Target::with_local_scope
has been moved to a new trait,LocalScopeExt
, and likeLocalScope::local_scope
only takes its size as a constant generic. This trait also providesLocalScopeExt::with_unsized_local_scope
. -
Many methods of
CCall
have been removed or turned into free-standing functions, the remainder has been deprecated. Use theweak_handle
macro instead. -
error_color
,include
, andusing
have been moved from the different handle types (andValue
) to a new trait,Runtime
. -
RuntimeSettings
has been added to allow targets to make use of theRuntime
trait, it can be created by callingTarget::runtime_settings
. -
Gc
is no longer implemented forLocalHandle
, but is implemented forGcInterface
which can be created for all active handles by callingIsActive::gc_interface
. -
The old sync runtime has been removed.
-
AsyncHandle
and the content of the tuple module have been removed from the prelude. -
LocalOutput
andLocalReusableSlot
are now justOutput
andReusableSlot
, these types have gained a generic that expresses which kind of slot is targeted. Methods namedlocal_output
andlocal_reusable_scope
are now namedoutput
andreusable_scope
. -
DataType::instantiate
has been removed, call theDataType
as a constructor instead. -
Exporting a new global with
static
is no longer possible to account for changes in Julia, creating new globals withModule::set_global(_unchecked)
will not work on Julia 1.12+. -
Module::is_imported
has been removed. -
An example that shows how the multithreaded runtime can be used with rayon has been added.
-
Cached data is guaranteed to be rooted.
-
()
maps toNothing
. -
Custom marking functions can be implemented with the
Mark
trait. -
ParametricBase
andParametricVariant
have been removed,OpaqueType
can now handle types with type parameters. BothOpaqueType
andForeignType
are now derive traits. -
Module::global_unchecked
can returnNone
if the global value doesn't exist. -
Module::function
has been removed, useModule::global
instead. -
LocalReturning
andReturning
have been removed, a scope's output type has been moved to the scope methods. All kinds of scopes are covered by traits:LocalScope
,LocalScopeExt
,Scope
, andAsyncScope
are all unsafe and sealed traits. -
The managed type
Function
has been removed, there is now an abstract type constructorFunction
instead. -
Julia arrays can no longer be indexed with tuples, use arrays instead.
-
TryCatchFuture
has been removed. -
IntoJlrsResult
has been removed in favor of supporting the?
operator by implementing conversions fromValue
toJlrsError
andBox<JlrsError>
. -
A custom
NamedTuple
type has been added, thenamed_tuple
macro has been moved to the newjlrs::data::managed::named_tuple
module and now returns aJlrsResult<NamedTuple>
.ProvideKeywords::provide_keywords
now requires an instance ofNamedTuple
to be passed. Several methods to access named tuples, and create new named tuple that extend an existing one have been added. The oldTypecheck
placeholder has been removed in favor of the newNamedTuple
type.ProvideKeywords
andWithKeywords
have been deprecated in favor of new methods for theCall
andCallAsync
traits that take a named tuple as an argument. -
Call::call0
,Call::call1
,Call::call2
, andCall::call3
have been deprecated in favor of usingCall::call
. -
All crates have been migrated to the 2024 edition of Rust.
-
The
JULIA_DIR
environment variable has been renamed toJLRS_JULIA_DIR
. -
Non-rooting targets are now called weak targets.
-
jl-sys has been split into jl-sys and jlrs-sys. All extensions have been moved to jlrs-sys.
-
The exception handler of
catch_exceptions
now takes anException
and is called in the catch block.