Rust 1.54 is Officially Released

Rust 1.54 is Officially Released
Photo by Kai Gradert / Unsplash

The Rust programming language has a unique approach that allows it to have a better code base with even fewer compromises than C, C++, and other languages which developers tend to use. This language gets updated quite regularly – literally almost every month with good improvements for developers.

If you have an older version of Rust already installed, updating to the newest is easy using the rustup package manager. You can update to the current version with the following command:

rustup update stable

On July 29, Rust version 1.54 supports invoking function-like macros inside attributes. Function-like macros can be macros based on macro-rules! or they can be procedural macros, which are invoked like macro!(…). A notable use case is including documentation from other files into Rust doc comments.

Other new features in Rust 1.54:

  • A number of intrinsics for wasm32 platform have been stabilized. These give access to SIMD instructions in WebAssembly.
  • Incremental compilation is re-enabled by default. It had been disabled by default in Rust 1.52.1. With Rust 1.52, additional validation was added when loading incremental compilation from on-disk cache, resulting in pre-existing potential soundness issues being uncovered as validation changed these silent bugs into internal compiler errors (ICE). Since then, work has been done to resolve these issues, with some fixes landing in Rust 1.53 and the majority landing in Rust 1.54. The remaining issues that could result in ICE are considered rare in practice.
  • Multiple methods and trait implementations have been stabilized.
  • Compiler output has been improved for debugging enums on Windows MSVC platforms for C++.

Rust 1.54 is following the June 17th release of Rust 1.53, which contains language and library features including the IntoIterator implementation for arrays.

Also introduced on May 6, Rust version 1.52 has an enhancement to tooling support for Clippy, which is a collection of lints to find mistakes and improve code written in Rust. Previously, running cargo check followed by cargo clippy would not actually run Clippy, with the build caching in Cargo not differentiating between the two. This has been fixed in Rust 1.52. Also in version 1.52, the following methods were stabilized:

Several previously stable APIs, including char::len_utf8 and u8LLeq_ignore_ascii_case, are now const. For the compiler, the default LLVM has been upgraded to LLVM 12. A subsequent point release of the language, Rust 1.52.1, published May 10, provides a workaround for a bug in incremental compilation that was made into a compiler error in Rust 1.52.0. Rust builders recommend either an upgrade to 1.52.1 or disabling incremental compilation.

Several previously stable APIs, including char::len_utf8 and u8LLeq_ignore_ascii_case, are now const. For the compiler, the default LLVM has been upgraded to LLVM 12. A subsequent point release of the language, Rust 1.52.1, published May 10, provides a workaround for a bug in incremental compilation that was made into a compiler error in Rust 1.52.0. Rust builders recommend either an upgrade to 1.52.1 or disabling incremental compilation.