A significant update to the popular maxminddb crate brings a major API redesign focused on safety and performance. The changes introduce lazy decoding and clarify unsafe operations, guiding developers toward more robust patterns.

With these updates, maxminddb reinforces its position as a production-ready tool by enhancing its safety guarantees. The key question for developers is how to best manage the migration to adopt these more efficient IP lookup patterns.

In this weeks’s Rust Crates recap:

> Maxminddb 0.27.0 lazy decoding and safety updates

> JSON5 crate hits stable 1.0.0

> Borsh 1.6.0 improves no_std support

Maxminddb overhauls its API for safer, lazy IP lookups

The Recap: The popular IP geolocation crate receives a major refresh with the release of maxminddb 0.27.0, introducing significant API changes focused on lazy decoding, improved safety, and better ergonomics.

Unpacked: This update includes several breaking changes aimed at creating a more robust and efficient library.

  • The lookup() method now returns a LookupResult, enabling lazy decoding of IP data so you only pay the performance cost when you access it.

  • Reader::open_mmap is now marked as unsafe, a key change that correctly reflects the potential dangers of a memory-mapped file being modified externally and addresses previous soundness issues.

  • The lookup_prefix() method has been removed; you should now use the lookup(ip)?.network() pattern to get the associated network block.

  • Error handling is more structured, with a new InvalidInput variant for input errors, giving you more granular control over failure cases.

  • Accessing translated names is easier, as the Names struct now replaces BTreeMap, allowing for direct field access like names.english.

Bottom line: These breaking changes require a thoughtful migration, but they guide developers toward safer and more performant IP lookup patterns. The update reinforces maxminddb's position as a robust, production-ready tool by enhancing both its safety guarantees and API design.

JSON5 hits stable 1.0

The Recap: The json5 crate, a parser for the human-friendly JSON5 data format, has officially reached its stable 1.0.0 release, signaling API stability and readiness for production use.

Unpacked: This release is a significant milestone focused on solidifying the library's foundation.

  • The 1.0.0 version provides a stable public API, allowing you to build on it with confidence and without expecting frequent breaking changes.

  • As a major upgrade from v0.4.1, this version finalizes the core parsing and serialization logic, making it a more dependable choice for your projects.

  • For those migrating, it's recommended to review the full changelog to understand all the enhancements and changes included in this update.

Bottom line: With a stable API, developers can now more confidently adopt json5 for projects that require a more flexible format for configurations or data interchange. This release gives the Rust ecosystem a mature and reliable parser for a popular, developer-friendly data format.

Borsh gets core-friendly

The Recap:Borsh 1.6.0 is here, enhancing its support for no_std environments by switching to core::net. This update makes the security-focused serialization format even more versatile for embedded and blockchain applications.

Unpacked: This release focuses on strengthening no_std compatibility and improving the developer experience.

  • The crate now uses core::net instead of std::net, moving it closer to full no_std support for environments where the standard library is not available.

  • As a result of this change, the MSRV is now 1.77, so you'll need to be on a recent Rust toolchain to use the latest version.

  • A key fix prevents variant name shadowing in the BorshSchema derive macro, making your schemas safer and more predictable.

  • The automatically_derived attribute has been added to derive macros, improving clarity in the generated code and tooling.

Bottom line: By embracing core, Borsh becomes an even better choice for security-critical projects that operate in constrained environments. This update reinforces its position as a reliable, go-to serialization format where minimal dependencies and correctness are non-negotiable.

The Shortlist

Reqwest-retry released version 0.8.0, offering developers robust middleware for implementing exponential backoff and other retry strategies for HTTP requests.

Crc updated to version 3.4.0, providing a flexible library with multiple pluggable algorithms for checksum calculations in no_std environments.

Reply

or to participate

Keep Reading