Software 44288 Published by

Rust 1.95.0 is now available via rustup update stable and brings a new cfg_select! macro designed to replace older configuration crates. Match expressions gain support for if-let guards which makes handling complex patterns much safer without needing extra dependencies. Embedded developers should note that custom target specs are no longer supported on the stable channel in this release. Users interested in testing can switch to beta or nightly builds but must report any bugs they find immediately.



Rust 1.95.0 release brings cleaner configuration macros and safer memory APIs

The Rust team has pushed out version 1.95.0 with some significant changes to how configuration macros work. Developers using rustup can grab this update immediately without breaking their existing toolchains. This release notes the stabilization of several memory safety APIs alongside a new macro that replaces older crates.

Why you should update your Rust 1.95.0 installation now

Getting the latest version is as simple as running the standard update command in the terminal. Users who rely on rustup can execute rustup update stable to switch over without needing manual file management. The team recommends keeping up with these minor releases because they often include critical bug fixes and performance improvements that accumulate quietly over time.

The cfg_select! macro simplifies conditional compilation logic

One of the biggest shifts in this version is the introduction of a new macro designed to replace common patterns found in platform-specific code. The cfg_select! macro acts like a compile-time switch statement for configuration flags and allows developers to define fallbacks more cleanly than before. This change fulfills the same purpose as the popular cfg-if crate but integrates directly into the standard library syntax. Power users will appreciate that this reduces external dependencies since the logic no longer requires an extra package in the Cargo.toml file.

New match guards allow safer pattern matching chains

The language team has finally brought let chain capabilities into match expressions to streamline complex conditionals. This feature allows for if-let guards within a match block so that multiple conditions can be checked before entering a code path. A scenario where this helps involves parsing data structures where you need to verify an inner type exists before proceeding with calculations. It is worth noting that the compiler does not currently consider patterns in these guards when checking for exhaustiveness warnings just like standard if guards do.

Custom target specs face destabilization on stable channels

Embedded developers or those building for unusual hardware architectures should pay close attention to the changes regarding JSON target specifications. Support for passing a custom target specification to rustc has been removed from the stable channel in this release. This decision impacts users who rely on fully stable toolchains for non-standard environments and forces them toward nightly features if they need that flexibility. The team is gathering use cases to see if some form of stabilization should happen eventually but requires more data first.

Anyone interested in helping catch bugs can switch their default channel to beta or nightly using rustup commands before the next release hits. Testing future releases involves reporting any unexpected behavior back through the official issue tracker so the maintainers can address them quickly. It is a good idea to keep backups of stable configurations when experimenting with newer channels just in case something breaks unexpectedly.

Announcing Rust 1.95.0 | Rust Blog

Empowering everyone to build reliable and efficient software.

Announcing Rust 1.95.0 | Rust Blog