← Thu, Nov 12 digest

Rust 1.100

read article ↗ hn thread ↗

Rust 1.100 stabilizes the never type (!) and core allocator APIs, and introduces Cargo dependency cooldowns to mitigate supply chain attacks.

summary is enough The release notes concisely outline major language and tooling additions, making a quick skim sufficient for most developers.

summary

Rust 1.100.0 marks a major milestone by finally stabilizing the never type (!) and core allocator APIs after years of development. It also introduces DropGuard for scoping cleanup logic, std::mem::conjure_zst for safe zero-sized type construction, and Cargo features like dependency cooldowns and unused dependency reporting. These additions improve type system expressiveness, memory management flexibility, and supply chain security.

key points

  1. The never type (!) is finally stabilized, allowing it to be named anywhere and acting as an alias for Infallible.
  2. The core Allocator API is stabilized, enabling custom allocators for Vec and Box.
  3. Cargo now supports dependency cooldowns via min-publish-age to hold back recently published package versions and reduce supply chain risks.
  4. Cargo adds built-in linting for unused dependencies and organizes build directory layouts to prevent cache collisions.

who should read it

Rust developers and library authors tracking language feature stabilizations and Cargo tooling updates.

discussion warm

consensus

Commenters express overwhelmingly positive reception, celebrating long-awaited features like the never type and improvements to Cargo's install behavior and unused dependency warnings.

pushback

Some users raise concerns about whether dependency cooldowns might cause developers to miss critical security patches, or lament ongoing issues with compilation times.

best comment by ammar_az ↗

This release is so big that multiple useful stabilized API aren't event mentioned in the blog post like:

- bool::toggle() https://doc.rust-lang.org/stable/std/primitive.bool.html#met...

- Box::map() https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#m...

- str::trim_prefix(), str::trim_suffix, Path::trim_prefix()

Highlights important newly stabilized APIs not mentioned in the official post, such as bool::toggle() and Box::map().

Generated by an LLM from the article and thread. Check the sources before relying on it.