Rust 1.93

The next stable release of the Rust compiler and language standard has been published.

Updated musl standard library to version 1.2.5

Various target platforms *-linux-musl are now shipped with musl 1.2.5. This primarily concerns static musl builds for x86_64, aarch64, and powerpc64le, which previously used version 1.2.3. This update includes several fixes and improvements, as well as one "breaking" change affecting the Rust ecosystem.

The main motivation for this update was significant improvements in the musl DNS resolver, which appeared in version 1.2.4 and were further refined in 1.2.5. When using musl for static linking, this should enhance the reliability of networking functions in portable Linux binaries, especially when dealing with large DNS records and recursive name servers.

However, version 1.2.4 also includes a critical change: the removal of several deprecated compatibility symbols used by the libc crate on GitHub. A fix for this was released in libc 0.2.146 back in June 2023 (2.5 years ago), and we believe it has spread widely enough that we can make changes to Rust target platforms.

Allowing global allocators to use TLS

Rust 1.93 adjusts the internal mechanisms of the standard library, allowing global allocators written in Rust to use std::thread_local! and std::thread::current without risking re-entrancy through the use of the system allocator. Details can be found in the Rust standard library documentation.

cfg attributes in asm! statements

Previously, if individual parts of the embedded assembly section required conditional cfg compilation, the entire asm! block had to be duplicated. In version 1.93, the cfg attribute can be applied to individual instructions within a block:

asm!( // or global_asm! or naked_asm! "nop", #[cfg(target_feature = "sse2")] "nop", // … #[cfg(target_feature = "sse2")] a = const 123, // only used on sse2 );

The following have been transitioned to stable API:

<[MaybeUninit]>::assume_init_drop <[MaybeUninit]>::assume_init_ref` <[MaybeUninit]>::assume_init_mut` <[MaybeUninit]>::write_copy_of_slice` <[MaybeUninit]>::write_clone_of_slice` String::into_raw_parts` Vec::into_raw_parts` ::unchecked_neg` ::unchecked_shl` ::unchecked_shr` ::unchecked_shl` ::unchecked_shr` ::as_array` ::as_array_mut` ::as_array` ::as_array_mut` VecDeque::pop_front_if` VecDeque::pop_back_if` Duration::from_nanos_u128` char::MAX_LEN_UTF8` char::MAX_LEN_UTF16` std::fmt::from_fn` std::fmt::FromFn`

Source: linux.org.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster