Announcing Rust 1.96
Recorded: May 28, 2026, 11:01 p.m.
| Original | Summarized |
Announcing Rust 1.96.0 | Rust Blog Rust Blog Rust Announcing Rust 1.96.0 May 28, 2026 ยท The Rust Release Team The Rust team is happy to announce a new version of Rust, 1.96.0. Rust is a programming language empowering everyone to build reliable and efficient software. What's in 1.96.0 stable New Range* types core::range::Range A Rust version in the near future will also add core::range::RangeFull and core::range::RangeTo as re-exports from core::ops (these do not implement Iterator and already implement Copy), and core::range::legacy::* as the new home for the current ranges. Range syntax like 0..1 still produces the legacy types for now, but will be updated to core::range types in a future edition. #[derive(Clone, Copy)] impl Span { Assert matching patterns /// [Random Number](https://xkcd.com/221/) fn main() { Stabilized APIs assert_matches! Two Cargo advisories CVE-2026-5223 is a medium severity vulnerability regarding extraction of crate tarballs with symlinks. CVE-2026-5222 is a low severity vulnerability regarding authentication with normalized URLs. Users of crates.io are not affected by either vulnerability. Other changes Contributors to 1.96.0 Get help! Documentation Terms and policies Code of Conduct Social RSS Main Blog Maintained by the Rust Team. See a typo? |
The Rust team announced the release of Rust version 1.96.0, focusing on stabilizing new features, clarifying range types in the standard library, and implementing changes related to WebAssembly targets and security fixes. A significant update involves the introduction of new range types, such as core::range::Range, core::range::RangeFrom, and core::range::RangeInclusive. This change addresses a design consideration where older core::ops types were expected to be Copy, but this conflicted with their implementation of Iterator. To resolve this conflict, the Rust team adopted RFC3550, proposing replacement range types that implement IntoIterator rather than Iterator, allowing these types to be Copy. This stabilization allows library authors to store slice accessors within Copy types without needing separate start and end indices, as demonstrated by the structure of Span types. The release also indicates future planned additions, including core::range::RangeFull and core::range::RangeTo as re-exports, alongside the establishment of core::range::legacy as the home for current ranges. Furthermore, library authors are advised to consider implementing the RangeBounds trait in their public APIs, favoring the new range types for concrete type usage. The release also introduces new assertion macros, assert_matches! and debug_assert_matches!. These macros function similarly to assert!(matches!(..)) and debug_assert!(matches!(..)) but enhance debugging by providing a more descriptive representation of the value upon a failure. Because these macros would conflict with popular third-party crates, they are not placed in the standard prelude; instead, they must be manually imported from core or std. Changes were implemented regarding WebAssembly targets, where the linker now enforces stricter rules by rejecting the use of the --allow-undefined flag. This change prevents undefined symbols from being converted to WebAssembly imports from the "env" module, forcing linking-related symbols to be explicitly defined, which helps catch build-time errors earlier. Several APIs have been stabilized in this version, including the new assertion macros, trait implementations like From<T> for AssertUnwindSafe<T>, LazyCell<T, F>, and LazyLock<T, F>, and the core range types. In addition to the structural changes, Rust 1.96.0 includes fixes for two security vulnerabilities, CVE-2026-5223 and CVE-2026-5222, which pertain to vulnerabilities in third-party registry tarball extraction and normalized URL authentication, respectively. These fixes do not affect users of crates.io directly. |