Rust 1.82 Improves Apple Support |
Written by Kay Ewbank |
Thursday, 24 October 2024 |
Following Rust's six-week release cycle, version 1.82 has been released with higher level support for Apple, and a new Info subcommand for Cargo. 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 enhanced support for developers targeting Apple operating systems starts with the raising of macOS on 64-bit ARM to Tier 1 support, which is Rust's highest guarantee of working properly. The developers say that to achieve this level of support, every change in the Rust repository must pass full tests on every tier 1 target before it can be merged. The new milestone puts the aarch64-apple-darwin target on par with the 64-bit ARM Linux and the X86 macOS, Linux, and Windows targets. The Rust team also announced that Mac Catalyst targets are now certified as Tier 2. Mac Catalyst is a technology by Apple that allows running iOS applications natively on the Mac. More generally, Rust's package manager Cargo now has an info subcommand to display information about a package in the registry, which the Rust team says fulfills a long standing request just shy of its tenth anniversary. Several third-party extensions have been written over the years to provide an alternative to the shortcoming. This release also adds support for the use<..> syntax to control which generic lifetime parameters are captured. Capturing a generic parameter allows that parameter to be used in the hidden type, which in turn affects borrow checking. However, until now lifetime parameters have not been captured in opaque types on bare functions and on functions and methods of inherent impls unless those lifetime parameters are mentioned syntactically in the opaque type. The new support fixes this. A final change of note was added in Rust 1.80 with the addition of Lazy Cell and Lazy Lock, which delay the initialization of their data until first access. They are similar to the OnceCell and OnceLock types, but with the initialization function included in the cell. This completes the stabilization of functionality adopted into the standard library from the popular lazy_static and once_cell crates. LazyLock is the thread-safe option, making it suitable for places like static values, while LazyCell does the same thing without thread synchronization. Version 1.82 of Rust is available now. More InformationRelated ArticlesRust Foundation Announces Safety-Critical Consortium Rust Foundation Establishes Security Team Google Supports Rust For Android OS Development To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |