Rust 1.100 blog.rust-lang.org · 270 points · 129 comments · HN thread TL;DR Rust...

@best30

Rust 1.100 blog.rust-lang.org · 270 points · 129 comments · HN thread

TL;DR Rust 1.100.0 is released, headlined by the stabilization of the never type (!) after about ten years, along with the core Allocator API, a DropGuard helper, std::mem::conjure_zst, and Cargo features for reporting unused dependencies, reducing build-dir cache collisions, and dependency cooldowns via min-publish-age. The release notes flag a breaking change: never-type fallback moves from () to ! in editions before 2024.

  • The never type ! is stable and can be named anywhere, e.g. Result<T, !>; Infallible is now an alias for it.
  • Never-type fallback changes from () to ! in editions 2015, 2018 and 2021, which may affect some code and make the compiler flag more unreachable code.
  • Core Allocator trait is stable, usable with Vec and Box; the Allocators 1.0 project goal continues with more collections.
  • std::mem::DropGuard runs a closure on drop and offers dismiss() for rollback-style APIs; std::mem::conjure_zst is an unsafe way to create zero-sized types.
  • Cargo warns about unused dependencies, and min-publish-age (dependency cooldowns) lets the resolver skip versions published too recently; cargo install ignores this setting.

Discussion The thread is mostly enthusiastic about the release, with many commenters naming their favorite features, especially the never type, custom allocators, dependency cooldowns and the unused-dependency warning. A large share of comments turn to compile times and disk usage in target and build directories, where some praise recent improvements and others say Rust is still too slow. A long sub-thread debates whether Rust should have a stable ABI, with maintainers explaining that generics make it hard. Some commenters also question the use of AI tools and whether language stability still matters.

  • Excited about the release and its long-awaited features (many): Many commenters celebrate the never type, allocators and cooldowns as long-term features finally landing. Several note that the release is big and thank the maintainers and contributors.
  • Compile times and build-dir size remain a serious problem (many): A large group says Rust builds are slow and consume huge disk space, especially with agents or large projects. Maintainers reply that work on compile speed, build-dir GC and smaller debug info is ongoing, though faster compiles and smaller build-dirs can conflict.
  • A stable ABI would be valuable but is hard (some): Several commenters want a stable Rust ABI for distributing libraries and dynamic linking. Maintainers say generics make this difficult and point to crABI and an eventual opt-in ABI, while others argue extern "C" already covers much of it.
  • Stable ABI is not worth the cost (a few): A minority argues that a stable ABI would freeze the language and bring C++-style limitations, and that it is not worth the effort.
  • The never type explanation is useful (some): Several commenters help explain ! as an uninhabited type, relating it to diverging code, bottom types and set theory, and note it is similar to noreturn in other languages.
  • Language stability matters less with coding agents (a few): One commenter argues that backward compatibility matters less with LLM coding agents, while another responds that durability and long-lived code remain important.

Links from the comments

#rust #release #compilerPerformance #abi #cargo #neverType