We're seeing a focus on stability and developer experience, with key fixes landing in Tokio's bytes crate and ergonomic improvements in actix-web. This reflects a maturing ecosystem where foundational libraries are being hardened for production use.

In this weeks’s Rust Crates recap:

> actix-web v4.12.0 streaming API ergonomics

> Tokio's bytes v1.11.0 stability fixes

> Servo parsers synchronize version numbers

Actix-Web Refines Streaming API for Better Ergonomics

The Recap: Popular web framework actix-web has released v4.12.0, an update focused on improving developer experience with smarter defaults for streaming responses and more explicit WebSocket feature handling.

Unpacked:

  • The streaming() method is now more intuitive, automatically setting the Content-Type to application/octet-stream if not specified. It also switches to a SizedStream when it detects a Content-Length header, preventing chunking.

  • A new ws crate feature has been introduced and is enabled by default. If you use default-features = false, you must now explicitly enable the ws feature to use WebSockets.

  • The EitherExtractError type is now publicly exported from the error module, making it easier to use in your own error handling logic.

Bottom line: This release streamlines common patterns, reducing boilerplate for streaming data and clarifying feature usage for custom builds. These thoughtful refinements continue to make the framework more robust and easier to work with.

Tokio's 'Bytes' Crate Hardens Stability

The Recap: A foundational crate in the async ecosystem, bytes, has been updated to v1.11.0. This release is focused on hardening the library with important fixes for buffer handling and correctness that enhance the reliability of production systems.

Unpacked:

  • This update ships several key stability fixes, most notably ensuring BytesMut only reuses a buffer source when it has remaining bytes, preventing potential data handling bugs.

  • A subtle but important behavioral change was made where BytesMut::remaining_mut now uses isize::MAX instead of usize::MAX as its limit.

  • The Minimum Supported Rust Version (MSRV) has been bumped to 1.57, so you'll need to be on a recent compiler to upgrade.

  • The release also revises capacity guarantees in BytesMut::put, further improving the crate's predictability and robustness.

Bottom line: While this release doesn't introduce new features, its focus on correctness is vital for the ecosystem's health. These fixes strengthen a core dependency for countless async projects, leading to more reliable and predictable applications.

Servo Parsers Sync Up for Sanity

The Recap: In a key ecosystem move, the Servo project has synchronized the version numbers of its core parsing crates, including html5ever, xml5ever, and markup5ever. This update is designed to simplify dependency management for developers building on Rust's web tooling.

Unpacked:

  • The main change is that all three parser crates now share a consistent version number. This eliminates confusion and makes it much easier to manage dependencies in projects that rely on them.

  • The release also includes internal cleanups, such as the removal of the mac crate dependency and unused options within the TreeBuilder.

  • Documentation was improved for the scripting_enabled and iframe_srcdoc options, providing more clarity for developers using these features.

Bottom line: This coordinated release is a practical quality-of-life improvement that reduces maintenance overhead for a foundational part of the Rust ecosystem. It's a welcome change that reinforces the stability and usability of Servo's libraries.

The Shortlist

exr removed its Rayon dependency in v1.74.0, simplifying its build and fixing PXR24 support on big-endian architectures.

os_info added Cygwin support and improved macOS version detection in v3.13.0, enhancing its cross-platform system information capabilities.

cssparser shipped version 0.36.0, delivering the latest updates to the foundational Servo library for low-level CSS tokenization and parsing.

Reply

or to participate

Keep Reading