Rust 1.93 has been released with an updated Musl library to improve networking. The new release also permits global allocators written in Rust to use std’s thread-local storage.
Rust is popular for situations including being embedded in other languages, writing programs with specific space and time requirements, and writing low-level code.
The first change of note is that the various *-linux-musl targets now all ship with musl 1.2.5. The update comes with several fixes and improvements, and a breaking change that affects the Rust ecosystem.
The main reason for making the change is that musl’s DNS resolver which shipped in 1.2.4 has major improvements over the previo…
Rust 1.93 has been released with an updated Musl library to improve networking. The new release also permits global allocators written in Rust to use std’s thread-local storage.
Rust is popular for situations including being embedded in other languages, writing programs with specific space and time requirements, and writing low-level code.
The first change of note is that the various *-linux-musl targets now all ship with musl 1.2.5. The update comes with several fixes and improvements, and a breaking change that affects the Rust ecosystem.
The main reason for making the change is that musl’s DNS resolver which shipped in 1.2.4 has major improvements over the previous version. The Rust team says that 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, meaning that developers need to make sure they’re using the Rust libc crate version 0.2.146 or later.
Announcing the change, the Rust team said:
"At this point we expect there will be minimal breakage, and most breakage should be resolved by a cargo update. We believe this update shouldn’t be held back any longer, as it contains critical fixes for the musl target."
Manual inspection of some of the affected projects indicates they largely haven’t run cargo update in 2 years, often because they haven’t had any changes in 2 years. Fixing these crates is as easy as cargo update.
Build failures from this change will typically look like "some ‘extern’ functions couldn’t be found; some native libraries may need to be installed or have their path specified".
Rust 1.93 also lets global allocators written in Rust use std’s thread_local! and std::thread::current without re-entrancy concerns by using the system allocator instead.
The other main change of note is the addition of the ability to apply cfg attributes to individual statements within the asm! block. Cfg attributes are used for configuration conditional checks. Until now, 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.
Rust has also stablilized 23 APIs.
Version 1.93 of Rust is available now.
More Information
Related Articles
Rust Celebrates 10 Years Since Version 1.0
Rust 1.84 Adds Strict Provenance APIs
Rust 1.83 Improves Const Context Code Handling
Rust 1.82 Improves Apple Support
To be informed about new articles on I Programmer, sign up for our weekly newsletter,subscribe to the RSS feed and follow us on Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info