Series: The Rust Annals
Vol. I Issue 94 nlopes.dev
Announcing Rust 1.93.0
Stabilizes critical standard library primitives, updates bundled musl for reliable static Linux networking, and improves inline assembly ergonomics.
Update bundled musl to 1.2.5
The various *-linux-musl targets now all ship with musl 1.2.5. This primarily affects static musl builds for x86_64, aarch64, and powerpc64le which bundled musl 1.2.3. This update comes with several fixes and improvements, and a breaking change that affects the Rust ecosystem.
For the Rust ecosystem, the primary motivation for this update is to receive major improvements to
musl’s DNS resolver which shipped in 1.2.4 and received bug fixes in 1.2.5. When using musl
targets for static linking, this should make portable Linux binaries that do networking more
reliable, particularly in the face of large DNS records and recursive nameservers.
However, 1.2.4 also comes with a breaking change: the removal of several legacy compatibility symbols that the Rust libc crate was using. A fix for this was shipped in libc 0.2.146 in June 2023 (2.5 years ago), and we believe has sufficiently widely propagated that we’re ready to make the change in Rust targets.
See our previous announcement for more details.
Allow the global allocator to use thread-local storage
Rust 1.93 adjusts the internals of the standard library to permit global allocators written in Rust
to use std’s thread_local! and
std::thread::current without
re-entrancy concerns by using the system allocator instead.
See docs for details.
cfg attributes on asm! lines
Previously, if individual parts of a section of inline assembly needed to be cfg’d, the full asm!
block would need to be repeated with and without that section. In 1.93, cfg can now be applied to
individual statements within the asm! 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
);