The bridge between Rust and Python just got stronger with a major release from PyO3. Version 0.27.0 introduces forward-looking support for Python 3.14 and a number of API enhancements.

This release focuses heavily on developer ergonomics, with a revamped object conversion trait and safer APIs for FFI. These improvements aim to make your Rust-Python workflow smoother and more robust.

In this weeks’s Rust Crates recap:

> PyO3 0.27.0 adds Python 3.14 support and API updates

> litrs reaches 1.0 for stable literal parsing

> bigdecimal 0.4.9 adds new mathematical functions

> cobs 0.5.0 modernizes with lifetime-free APIs

PyO3 v0.27.0 Boosts Python Interop, Adds Python 3.14 Support

The PyO3 project, the essential toolkit for Rust and Python interoperability, just rolled out a major v0.27.0 update. This release strengthens the bridge between the two ecosystems with future-proofing and significant API enhancements.

Here’s a look at what’s new:

  • Python 3.14.0 final support: Your bindings are now ready for the next major Python version right out of the box.

  • Breaking change: Support for PyPy 3.9 and 3.10 has been dropped, as both versions are no longer supported upstream.

  • Revamped FromPyObject Trait: A major rework brings performance and flexibility improvements, aligning it with the IntoPyObject trait for a more consistent developer experience.

  • New .cast() API: The .downcast() family of functions is now deprecated. The new .cast() API improves ergonomics and delivers clearer error messages on failed conversions.

  • Safer PyCapsule API: Operations on PyCapsule have been updated to fix lifetime issues and encourage name-checking, making your FFI code more robust.

Why it matters: This update makes your Rust-Python workflow smoother and more performant. You get immediate compatibility with Python's latest features, a cleaner and faster API for converting Python objects, and better safety guarantees, reducing common pain points in FFI development.

Bottom line: PyO3 0.27.0 solidifies its role as a cornerstone of the Python-in-Rust ecosystem. The team has provided a detailed migration guide to help you smoothly transition your projects to the latest version.

Litrs Hits 1.0 for Stable Literal Parsing

The lightweight literal parsing crate litrs has officially reached its 1.0.0 milestone, signaling API stability for procedural macro authors seeking a focused alternative to syn.

Why it matters: For developers writing proc-macros, litrs offers a fast and efficient tool for a specific job. Hitting version 1.0 means you can now rely on its stable API for production use, helping to reduce dependencies and potentially speed up your macro's compile times.

The release solidifies the API from the v0.5 series with one key breaking change designed for future-proofing. You can review the changes in the full release notes.

  • Breaking Change: The Literal enum is now marked as #[non_exhaustive]. This prevents exhaustive matching, allowing the crate to add new literal types in the future without breaking your code.

Bottom line: If your proc-macro only needs to inspect literals, litrs is a dependable and stable choice. Check out the official documentation to see how you can integrate it into your projects.

BigDecimal Gets a Math Upgrade

The bigdecimal crate, a staple for arbitrary-precision decimal math, just shipped version 0.4.9, adding powerful new mathematical functions and useful optimizations.

Why it matters: For developers working in finance or scientific computing where floating-point errors are unacceptable, bigdecimal is essential. This update makes it easier to perform complex calculations like exponentiation and controlled-precision multiplication, improving both developer ergonomics and performance.

Here’s a look at what’s new, with more details in the full release notes:

  • New exponentiation methods like powi and powi_with_context let you raise a decimal to an i64 power.

  • Context-aware multiplication via mul_with_context enables efficient multiplication to a fixed precision.

  • Helpful inspection methods, including decimal_digit_count and order_of_magnitude, give you more insight into your numbers.

  • Performance boosts for inverse calculations now use f64 conversions to make a much better initial guess for the iterative algorithm.

COBS Crate Modernizes with Lifetime-Free APIs

The cobs crate, a key tool for byte stuffing in serial communication, just shipped version 0.5.0, bringing it up to the Rust 2024 edition and introducing new APIs that significantly improve the developer experience for embedded systems.

Here’s a look at what’s new:

  • Lifetime-Free Decoders: The update adds CobsDecoderOwned and CobsDecoderHeapless, new decoders that own their internal buffers. This is a major ergonomic win, as it removes the need to manage buffer lifetimes manually.

  • Modernization: The crate now uses the Rust 2024 edition and has updated its Minimum Supported Rust Version (MSRV) to 1.86.

  • Enhanced Encoding: New functions like encode_including_sentinels provide more fine-grained control over the final encoded output.

Why it matters: For developers in no_std environments, the new lifetime-free decoders are a big deal. They simplify managing state and make the API much easier to work with, allowing you to integrate robust data framing into your projects without fighting the borrow checker.

The Shortlist

typed-builder shipped version 0.23.0, upgrading to the Rust 2024 edition and introducing breaking changes to its default expression handling alongside new features like default_where.