Rust 1.100 blog.rust-lang.org · 42 points · 64 comments · HN thread TL;DR Rust 1...

@best

Rust 1.100 blog.rust-lang.org · 42 points · 64 comments · HN thread

TL;DR Rust 1.100.0 has been released, headlined by the stabilization of the never type (!) after about ten years and five failed attempts, along with the core Allocator API, a DropGuard helper, std::mem::conjure_zst, and Cargo features for unused-dependency warnings, build-dir cache layout, and dependency cooldowns. The release also includes a breaking change to never-type fallback in editions before 2024. The thread discusses the release's scope, compile times, and whether Rust should ever have a stable ABI.

  • The never type ! is stable and can now be named anywhere, e.g. Result<T, !>; Infallible becomes an alias for it.
  • Never-type fallback changes from () to ! in editions 2015, 2018 and 2021, a breaking change that may make the compiler flag more code as unreachable.
  • The core Allocator trait is stabilized, usable with Vec and Box; this is the foundation of the Allocators 1.0 project goal.
  • core::mem::DropGuard runs a closure on drop and offers dismiss() for rollback-style APIs; std::mem::conjure_zst creates zero-sized types in an unsafe way.
  • Cargo gains a warning for unused dependencies (via [lints.cargo]), a reworked build-dir layout that consistently applies the build-config hash, and min-publish-age dependency cooldowns configurable via global-min-publish-age.

Discussion The thread is mostly enthusiastic, celebrating the long-awaited never type and the size of the release, with many commenters listing their favorite features. Several questions came up: whether the release made compilation faster (answered with links to ongoing compiler performance work and notes that build-dir size and speed can conflict), whether Rust should have a stable ABI (a long sub-discussion involving generics, extern "C", and the crABI effort), and what the never type means for newcomers. The mood is positive with some friendly jokes about the type's name and its long wait.

  • Excited about never type and the big stabilizations (many): Many commenters call this a monumental release and praise the long-term features finally landing. Commenters highlight the never type, custom allocators, and dependency cooldowns as favorites.
  • Stable ABI is desirable but hard due to generics (some): Several commenters want a stable ABI to allow distributing prebuilt libraries. Others, including a Rust team member, explain that generics make a stable ABI difficult, and that extern "C" is the current option.
  • Stable ABI is not worth it (a few): Some argue a stable ABI would reduce flexibility, citing C++ as an example of how entrenched ABI stability limits evolution, and say prebuilt libraries are not needed.
  • Compile times and disk use still too high (some): Users complain about slow compiles and very large target directories. Replies point to ongoing compiler speedups, planned build-dir cleanup, and the Cranelift backend, while others suggest using a different language.
  • Backward compatibility should relax for LLM-era coding (a few): One commenter argues compatibility matters less when coding agents can migrate code quickly. A reply argues Rust's value lies in code lasting a long time rather than being regenerated.
  • Unused-dependency warning is useful in practice (a few): One user reports an AI coding session that used the new warning to remove many unused dependencies without problems.

Links from the comments

#rust #compilers #release #neverType #cargo