Rust 1.100 stabilises never type and dependency cooldowns

A cracked obsidian vault revealing glowing circuitry inside, with threads of light escaping into a dark landscape, symbolising long-locked features now released and controlled execution paths.

Rust 1.100.0 has arrived after a decade of development, stabilising the never type (!) and introducing dependency cooldowns to improve code safety and supply chain resilience. The update also delivers foundational allocator APIs and new tooling for memory management, affecting developers across the UK, US, UAE, and Kazakhstan who rely on Rust for high-assurance systems.

Never type finally stable after 10 years

The never type, spelled !, represents computations that never return—such as return, break, or std::process::exit. For the first time, it can be named anywhere in code, including in generic contexts like Result<T, !>. This completes a project goal delayed by five failed stabilisation attempts and complex compatibility concerns.

Previously, Infallible served as a placeholder for unreachable code. Now it is an alias to !, aligning old APIs with the new standard. However, this required a breaking change: in editions before 2024, the compiler’s fallback for unresolved never types shifted from () to !. While largely invisible, it may reveal previously masked unreachable code. The team issued advance warnings and fixed affected public crates.

Custom allocators now stable for core types

Rust 1.100 stabilises the Allocator trait, enabling custom memory allocators for Vec and Box. This fulfils a core goal of the Allocators 1.0 initiative, allowing developers in regulated or embedded environments—such as fintech in London or industrial systems in Almaty—to control memory strategies without forking standard types.

Future work will expand support to more collections, but the foundation is now set. Developers in high-frequency trading or aerospace (e.g., UAE-based drone software) can begin designing allocators tuned to real-time constraints. However, full ecosystem adoption will take time, and tooling that inspects build directories may need updates due to internal layout changes.

Safer exits and zero-sized types

core::mem::DropGuard simplifies cleanup logic by running a closure when a variable goes out of scope—even during panic or early return. This is particularly useful for transaction-like patterns, such as rolling back partial parser state, without defining a full struct with Drop.

The release also introduces std::mem::conjure_zst, a dedicated unsafe function to create zero-sized types (ZSTs). Previously, developers used hacks like MaybeUninit::uninit().assume_init(). Now, a canonical method exists—but it remains unsafe, as fabricating ZSTs like GIL tokens could break safety in bindings such as Python interop.

Cargo gains unused dependency warnings and cooldowns

Cargo now warns about unused [dependencies] when building all targets, helping teams trim bloat. The warning only triggers if no target uses the crate, so partial builds may miss it. Dev-dependencies are excluded due to testing variability.

More significantly, min-publish-age (“dependency cooldowns”) is now stable. By setting global-min-publish-age = "3 days" in .cargo/config.toml, teams can delay adoption of fresh crates, reducing exposure to typosquatting or malicious uploads. The resolver skips new versions unless already locked, though cargo install ignores this—requiring manual pinning for safety.

What it means

For founders and engineers, Rust 1.100 reduces long-term technical debt. The never type improves type precision, while allocator control enhances performance predictability—critical for systems where memory behaviour must be auditable. Cooldowns offer a pragmatic shield against supply chain attacks, especially valuable in regulated UK fintech or Kazakh critical infrastructure.

However, the changes demand attention: teams should audit dependencies, update CI to build all targets (to catch unused crates), and assess allocator needs. The internal build layout shift may break scripts relying on artifact paths; using JSON output is now advised.

Rust strengthens foundations, not just features

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *