Paul Krill
Editor at Large

Rust 1.82 brings Cargo info subcommand

news
Oct 21, 20243 mins

Language update adds info subcommand to Cargo that provides detailed information about packages in the Cargo registry.

shutterstock 77260183 rusty old woodworking tools on the wall of an old workshop
Credit: Mihai Simonia / Shutterstock

Rust 1.82, the newest version of the popular memory-safe programming language, fulfills a longstanding request for displaying information in the Cargo package manager registry. Also with Rust 1.82, Apple macOS on 64-bit Arm now offers Rustโ€™s highest guarantee of functionality.

The update was announced October 17. Developers using a previous version of Rust can access the update by running the command rustup update stable.

For Cargo, Rust adds a cargo info subcommand to show information about a package in the registry. This feature has been requested for nearly 10 years. Third-party extensions like this have been written over the years; this implementation was developed as cargo-information before merging into Cargo itself.

Also in Rust 1.82, aarch64-apple-darwin for macOS on 64-bit Arm CPUs now is a tier 1 Rust target, backed by the highest guarantee of working properly. Every change in the Rust repository must pass full tests on every tier 1 target before it can be merged. This target had been introduced as tier 2 in Rust 1.49, making it available in rustup. The new milestone puts the aarch64-apple-darwin target on par with the 64-bit Arm Linux and x86 macOS, Linux, and Windows targets. Additionally, targets for Mac Catalyst, an Apple technology for running iOS applications natively on the Mac, now are tier 2.

Rust 1.82 follows the September 5 release of Rust 1.81, which stabilized the Error trait in the Rust core library. Elsewhere in Rust 1.82:

  • Rust now supports the use<..> syntax within certain impl Trait bounds to control which generic lifetime parameters are captured. Return-positionย impl Trait (RPIT) types in Rust capture certain generic parameters. Capturing a generic parameter allows the parameter to be used in the hidden type. That, in turn, affects borrow checking.
  • Native syntax for creating a raw pointer is featured.ย 
  • It is the responsibility of persons writing the extern block to ensure that all signatures contained within it are correct; thus, developers now can write unsafe extern. A benefit of this is that items within an unsafe extern block can be marked as safe to use.
  • Some Rust attributes, such as no-mangle, can be used to cause undefined behavior without any unsafe block. If this were regular code, it would be required that these be placed in an unsafe {} block, but so far, attributes have not had comparable syntax. To reflect that these attributes can undermine Rust safety guarantees, these now are considered โ€œunsafeโ€ and should be written as follows: #unsafe(no_mangle)] pub fn my global_function (){}
  • Patterns that match empty types now can be omitted.
  • Rust 1.82 standardizes on a set of rules for how NaN (not a number) values behave.
  • The const assembly operand now offers a way to use integers as immediates without first storing them in a register.
Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorldโ€™s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorldโ€™s audience of software developers and other information technology professionals. Paul has won a โ€œBest Technology News Coverageโ€ award from IDG.

More from this author