Rust 1.94.0 Is Here: What's New in the Latest Release

Mar 05, 2026 310 views

Rust 1.94.0 is now available. To upgrade from a previous installation via rustup, run:

$ rustup update stable

New to Rust? You can install rustup from the official website. The full release notes for 1.94.0 are also available for a complete breakdown of changes.

Want to help shape future releases? Switch to the beta channel (rustup default beta) or nightly channel (rustup default nightly) and file any bugs you encounter.

What's in 1.94.0 stable

Array windows

Rust 1.94 stabilizes array_windows, a new slice iterator that behaves like the existing windows method — but with a compile-time constant length. That means iterator items are typed as &[T; N] rather than the dynamically-sized &[T], enabling destructuring patterns and eliminating the need for manual indexing. In many cases, the compiler can even infer the window size from how the iterator is used.

Consider a classic example from the 2016 Advent of Code: detecting ABBA patterns — "two different characters followed by the reverse of that pair, such as xyyx or abba." Assuming ASCII input, this can now be written cleanly as:

fn has_abba(s: &str) -> bool {
 s.as_bytes()
 .array_windows()
 .any(|[a1, b1, b2, a2]| (a1 != b1) && (a1 == a2) && (b1 == b2))
}

The destructuring pattern in the closure tells the compiler to use windows of size 4 — no explicit argument needed. Compare this to the older .windows(4) approach, which returns a dynamically-sized slice requiring manual indexing and relying on the optimizer to eliminate runtime bounds checks.

Cargo config inclusion

Cargo now supports an include key in configuration files (.cargo/config.toml), making it easier to split, share, and manage Cargo settings across projects and environments. Included paths can be marked optional to gracefully handle cases where a file may not be present — for instance, configurations tied to individual developer preferences.

# array of paths
include = [
 "frodo.toml",
 "samwise.toml",
]

# inline tables for more control
include = [
 { path = "required.toml" },
 { path = "optional.toml", optional = true },
]

See the include documentation for the full set of options.

TOML 1.1 support in Cargo

Cargo now parses TOML v1.1 for both manifests and configuration files. See the TOML release notes for a full list of changes, including:

  • Inline tables spanning multiple lines and with trailing commas
  • \xHH and \e string escape characters
  • Optional seconds in time values (defaults to 0)

For example, a dependency declaration like this:

serde = { version = "1.0", features = ["derive"] }

...can now be expressed in a more readable, multi-line form:

serde = {
    version = "1.0",
    features = ["derive"],
}

One important caveat: adopting these TOML 1.1 features in Cargo.toml will raise your development MSRV (minimum supported Rust version) to require the new Cargo parser, and third-party tools that read manifest files may also need to update their own parsers. That said, Cargo automatically rewrites manifests at publish time to remain compatible with older parsers, so you can still target an earlier MSRV for your crate's end users.

Stabilized APIs

The following previously stable APIs are now also usable in const contexts:

Other Changes

For a complete picture of what changed in this release, see the full changelogs for Rust, Cargo, and Clippy.

Contributors to 1.94.0

Rust 1.94.0 was made possible by the collective effort of many contributors across the community. Thank you to everyone involved.

Source: The Rust Release Team · https://blog.rust-lang.org/2026/03/05/Rust-1.94.0/

Comments

Sign in to comment.
No comments yet. Be the first to comment.

Related Articles

Announcing Rust 1.94.0