github Taaitaaiger/jlrs v0.22.0
V0.22.0

latest release: v0.22.1
3 days ago

v0.22

  • Several aliases for JuliaResult have been added so they can be more easily returned from an exported funtion.

  • The JuliaResultExt and JuliaResultExt 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, and PersistentTask traits no longer use async_trait. To migrate existing PersistentTasks, remove the async_trait-annotation. AsyncTasks now take self by value, so to migrate them remove the annotation and change &mut self in run to self.

  • 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 closures AsyncFnOnce(AsyncGcFrame) -> T, so async closures can be used instead of implementing AsyncTask. The method AsyncGcFrame::relaxed_async_scope has been removed, async closures correctly handle the lifetime requirements.

  • ManagedRef has been renamed to ManagedWeak. Managed::as_ref has been deprecated in favor of Managed::as_weak. <Managed>Ref types have been renamed to Weak<Managed>.

  • The into_weak method has been added to WeakManaged which converts an arbitrary WeakManaged to a specific Weak 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, and JLRS_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 like LocalScope::local_scope only takes its size as a constant generic. This trait also provides LocalScopeExt::with_unsized_local_scope.

  • Many methods of CCall have been removed or turned into free-standing functions, the remainder has been deprecated. Use the weak_handle macro instead.

  • error_color, include, and using have been moved from the different handle types (and Value) to a new trait, Runtime.

  • RuntimeSettings has been added to allow targets to make use of the Runtime trait, it can be created by calling Target::runtime_settings.

  • Gc is no longer implemented for LocalHandle, but is implemented for GcInterface which can be created for all active handles by calling IsActive::gc_interface.

  • The old sync runtime has been removed.

  • AsyncHandle and the content of the tuple module have been removed from the prelude.

  • LocalOutput and LocalReusableSlot are now just Output and ReusableSlot, these types have gained a generic that expresses which kind of slot is targeted. Methods named local_output and local_reusable_scope are now named output and reusable_scope.

  • DataType::instantiate has been removed, call the DataType as a constructor instead.

  • Exporting a new global with static is no longer possible to account for changes in Julia, creating new globals with Module::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 to Nothing.

  • Custom marking functions can be implemented with the Mark trait.

  • ParametricBase and ParametricVariant have been removed, OpaqueType can now handle types with type parameters. Both OpaqueType and ForeignType are now derive traits.

  • Module::global_unchecked can return None if the global value doesn't exist.

  • Module::function has been removed, use Module::global instead.

  • LocalReturning and Returning 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, and AsyncScope are all unsafe and sealed traits.

  • The managed type Function has been removed, there is now an abstract type constructor Function 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 from Value to JlrsError and Box<JlrsError>.

  • A custom NamedTuple type has been added, the named_tuple macro has been moved to the new jlrs::data::managed::named_tuple module and now returns a JlrsResult<NamedTuple>. ProvideKeywords::provide_keywords now requires an instance of NamedTuple to be passed. Several methods to access named tuples, and create new named tuple that extend an existing one have been added. The old Typecheck placeholder has been removed in favor of the new NamedTuple type. ProvideKeywords and WithKeywords have been deprecated in favor of new methods for the Call and CallAsync traits that take a named tuple as an argument.

  • Call::call0, Call::call1, Call::call2, and Call::call3 have been deprecated in favor of using Call::call.

  • All crates have been migrated to the 2024 edition of Rust.

  • The JULIA_DIR environment variable has been renamed to JLRS_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 an Exception and is called in the catch block.

Don't miss a new jlrs release

NewReleases is sending notifications on new releases.