Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Protecting the Rust standard library from accidental breakage

The Rust standard library utilizes cargo-semver-checks to safeguard against unintentional alterations that could disrupt stable code. This initiative arose from several instances where modifications to the library led to incompatibilities with nightly Rust builds. In 2020, adding an unstable required method to a stable trait caused issues for the async-std library.

A generic method added to BuildHasher in 2021 lacked a where Self: Sized guard, rendering it nondynamic-safe. In 2022, a soundness fix for iterators like ChunksMut introduced instability, necessitating further adjustments to prevent conflicts with stable Rust. Most recently, in 2026, tokio developers discovered that their test suite failed to compile in Rust 1.94 on Windows due to the addition of unstable methods to a standard trait.

These incidents highlight the complexity of detecting accidental breakages, as even experienced developers and reviewers may overlook such issues. To address this, the Rust team developed cargo-semver-checks, which can now identify a range of problems, including the destabilization of previously stable APIs and the divergence between an item's name and its capabilities.

The tool works by extracting stability information from rustdoc JSON, enabling it to flag potential issues during the CI process. By employing this tool, the Rust standard library aims to maintain a consistent and reliable API across all releases, ensuring that developers can rely on the stability of the library without worrying about unexpected changes.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at predr.ag →

More in Tech

What If Programs Were Mostly Just Values Flowing Through Functions?

I've never particularly enjoyed reading code that makes me suddenly switch from following values to chasing control flow. A variable gets assigned halfway through. A function returns halfway through.

  • The author prefers code that shows values flowing through functions.
  • They created F-Box to maintain smooth value flow with a pipe helper.
  • Seseragi programming language emphasizes pleasant, intuitive code structure.

Why Should the Language Change the Moment I Build a UI?

In ordinary application code, I create values, pass them to functions, and distinguish between cases. Then Web UI begins, and sometimes the whole world changes. Component. Hooks. JSX. Store.

  • Seseragi framework treats components as ordinary functions.
  • UI expressed as ordinary values and data constructors.
  • Development mirrors language progression, feels natural.

More from Sunday 16 August →