Announcing Rust 1.96

TL;DR

The Rust team announced version 1.96.0, adding stable range types, new pattern-matching macros, and updates to WebAssembly targets. These improvements aim to increase safety and developer convenience.

The Rust programming language has released version 1.96.0, introducing stable range types, new macros for pattern matching, and changes to WebAssembly linking behavior, marking significant updates for developers relying on Rust’s safety features.

The release stabilizes new range types from RFC3550, including core::range::Range, RangeFrom, and RangeInclusive, enabling safer and more flexible slice handling. It also adds assert_matches! and debug_assert_matches! macros for improved pattern matching diagnostics, which require manual import to avoid conflicts with third-party crates. Additionally, WebAssembly targets no longer allow undefined symbols during linking unless explicitly re-enabled, reducing bugs and misconfigurations. The update also addresses two security vulnerabilities (CVE-2026-5223 and CVE-2026-5222) related to crate tarball extraction and URL normalization, though affected users are primarily third-party registry users, not crates.io users.

Why It Matters

This update enhances Rust’s safety and developer ergonomics, particularly through the stabilization of range types and pattern matching macros. The WebAssembly change improves build reliability and security by catching linking issues earlier. Security fixes further reinforce Rust’s commitment to safe, reliable software development, making this a noteworthy release for both core language users and those working with WebAssembly and third-party crates.

Rust Programming with AI: A Complete Beginner's Guide to Modern Rust Development, Systems Programming, and AI-Powered Applications

Rust Programming with AI: A Complete Beginner's Guide to Modern Rust Development, Systems Programming, and AI-Powered Applications

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Rust 1.96.0 follows a series of releases focused on stabilizing RFCs related to range types and pattern matching macros introduced in previous proposals. The stable release of core::range types addresses longstanding expectations for range behavior and storage. The pattern matching macros respond to common developer needs for clearer diagnostics. The WebAssembly linking change aligns with ongoing efforts to improve module security and correctness. Prior to this, Rust versions included various updates to language features, security patches, and tooling improvements, reflecting a steady evolution of the language.

“We’re excited to announce Rust 1.96.0, which stabilizes new range types, adds useful pattern matching macros, and improves WebAssembly linking security.”

— The Rust team

“Stabilizing these range types and macros helps developers write safer, more expressive code while reducing common bugs.”

— Rust language developer

Amazon

WebAssembly development kit

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how widely adopted the new range types and macros will become in existing codebases, or whether future editions will further modify range syntax. The impact of the WebAssembly linking change on legacy modules or specific build configurations remains to be seen, as some users may need to explicitly re-enable the old behavior.

Amazon

Rust pattern matching macros

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Developers are encouraged to update their toolchains to Rust 1.96.0 and test their code with the new range types and macros. Future releases may include additional features or adjustments based on community feedback. The Rust team is also monitoring the security fixes’ impact on third-party ecosystem tools and crates.

RUTLAND Stove Polish Paste for Cast Iron and Steel - Triple Wax Blend Restores Wood Stoves and Prevents Rust, Made in USA, 2.3 oz

RUTLAND Stove Polish Paste for Cast Iron and Steel – Triple Wax Blend Restores Wood Stoves and Prevents Rust, Made in USA, 2.3 oz

Combination of three different waxes and deep black pigments make this the ideal choice for polishing your stove

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What are the main new features in Rust 1.96.0?

Stable range types (Range, RangeFrom, RangeInclusive), new pattern matching macros (assert_matches!, debug_assert_matches!), and WebAssembly linking behavior changes.

How do I get Rust 1.96.0?

If you have rustup installed, run rustup update stable. You can also download it from the official Rust website or use the beta/nightly channels for testing upcoming features.

Are there any security concerns addressed in this release?

Yes, Rust 1.96.0 fixes two vulnerabilities (CVE-2026-5223 and CVE-2026-5222) related to crate tarball extraction with symlinks and URL normalization, primarily affecting third-party registry users.

Will the new range types replace the legacy ones?

Yes, the new core::range types are intended to become the default in future editions, although legacy range syntax like 0..1 still produces the old types for now.

Source: Hacker News

You May Also Like

Microsoft BitLocker-protected drives can now be opened with just some files on a USB stick — YellowKey zero-day exploit demonstrates an apparent backdoor

Security researcher reveals a zero-day exploit allowing access to BitLocker-protected drives via simple file transfer, raising security concerns.

Batman Sequel to Showcase Villain Never Before on Film

I can’t wait for the new Batman sequel revealing a groundbreaking villain with personal ties to Bruce Wayne, but you’ll have to read on to learn more.

News about Raspberry Pi 6 and Microcontroller Development

Raspberry Pi engineers reveal plans for Pi 6 in 2028 and updates on microcontrollers, highlighting hardware and software priorities.

Bourdain's First Love: The Enigmatic Nancy Putkoski

Uncover the mysterious and profound impact of Nancy Putkoski on Anthony Bourdain's life, love, and culinary journey, a story that will captivate and inspire.