NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #1818 most downloaded on crates.io
Library for reading MaxMind DB format used by GeoIP2 and GeoLite2
Last release 26 days ago
12 Sep 2026
Ships unpredictably
gaps range from 2 weeks to 1.8 years
Most releases are documented
notes for 39 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
63 releases · first in 2014
Reused precharged map-key bytes for raw identifier decoding, avoiding a second header parse while preserving payload limits and other Serde entry poin
simdutf8 feature and its optional dependency. It didsimdutf8 from dependency feature lists whendecode_path() performance by specializing map-key headerFixed a denial-of-service issue when decoding records or metadata. A crafted database could repeatedly reference shared data, causing excessive CPU an
One column per quarter.
MaxMindDbError::ResourceLimit.Reader::verify() now checks data referenced by unknown metadata fields.Reader::verify() to prevent excessive CPUMaxMindDbError::ResourceLimit when this limit is exceeded.Fixed typed decoding of malformed overflowing extended types to consistently return an InvalidDatabase error.
InvalidDatabase error.No user-visible changes. This release republishes 0.30.1 because its immutable GitHub release was deleted.
Fixed malformed extended data types so decoding returns an InvalidDatabase error instead of panicking on u8 overflow. GitHub #122.
InvalidDatabase error instead of panicking on u8 overflow. GitHub #122.Added deserialize_any_with_raw_strings() for Serde-based format adapters to validate MMDB strings while constructing another runtime's native string t
deserialize_any_with_raw_strings() for Serde-based format adaptersdecode_path() error rendering for extreme negative indexes andverify() to validate shared data-section pointer targets once, rejectBreaking: Metadata::build_time() now returns Result<SystemTime, MaxMindDbError> instead of panicking on unrepresentable timestamps, and databases whos
Metadata::build_time() now returnsResult<SystemTime, MaxMindDbError> instead of panicking onbuild_epoch cannot beSystemTime are rejected as invalid during open and verify.Reader::metadata is now private. Use Reader::metadata() towithin() and networks() now handle IPv6 databases without anFixed: Databases with an impossible declared search tree size are now rejected during open/verify instead of causing runaway allocation during validat
within() now rejects IPv6 CIDRs on IPv4-only databases insteadLookupResult::network() now uses the reader's measured IPv4Performance improvement: Faster search-tree traversal by dispatching on the database's record size to monomorphized node readers, replacing per-step b
deserialize_any.InvalidDatabase error instead of panicking.Removed the release_max_level_info feature from the log dependency, as libraries should not set a global release log-level cap. Pull request by monosa
release_max_level_info feature from the log dependency, asPerformance improvement: Faster lookups and record decoding in common paths, including control-byte header parsing and integer decoding.
Performance improvement: Skipped UTF-8 validation for map keys during deserialization. This significantly speeds up full record decoding by treating k
This release includes significant API changes. See UPGRADING.md for migration guidance.
This release includes significant API changes. See UPGRADING.md
for migration guidance.
lookup() now returns LookupResult instead of Option<T>. The new APIlookup_prefix() has been removed. Use lookup(ip)?.network() instead.within() now requires a second WithinOptions parameter. UseDefault::default() for the previous behavior.Within iterator now yields LookupResult instead of WithinItem<T>.names fields now use a Names struct instead of BTreeMap<&str, &str>.names.english).city, country, location, etc.) are nowDefault, simplifying access patterns.is_anonymous_proxy and is_satellite_provider from Traits.InvalidDatabase and Decoding variants now use structured fields insteadInvalidInput variant for user input errors (e.g., IPv6 lookup inReader::open_mmap is now unsafe. The caller must ensure the databaseReader exists. This fixes aLookupResult type with lazy decoding support:
has_data() - Check if data exists for this IPnetwork() - Get the network containing the IPoffset() - Get data offset for caching/deduplicationdecode() - Deserialize full recorddecode_path() - Selectively decode specific fields by pathPathElement enum and path! macro for navigating nested structures.WithinOptions to control network iteration behavior:
include_aliased_networks() - Include IPv4 via IPv6 aliasesinclude_networks_without_data() - Include networks without data recordsskip_empty_values() - Skip empty maps/arraysnetworks() method for iterating over all networks in the database.verify() method for comprehensive database validation.Metadata::build_time() to convert build_epoch to SystemTime.PartialEq and Eq implementations for Metadata and WithinOptions.decode_path() errors include path context showing where navigation failed.is_human_readable() returnsdeserialize_ignored_any, and deserialize_enum support.MaxMindDbError is now #[non_exhaustive].BREAKING CHANGE: The lookup and lookup_prefix methods now return Ok(None) or Ok((None, prefix_len)) respectively when an IP address is valid but not f…
lookup and lookup_prefix methods now returnOk(None) or Ok((None, prefix_len)) respectively when an IP address isErr(MaxMindDbError::AddressNotFoundError).AddressNotFoundError must be updated toOk(None) / Ok((None, prefix_len)) variants.MaxMindDBError enum has been renamedMaxMindDbError and variants have been renamed and refactored. ForIoError is now Io, InvalidDatabaseError is nowInvalidDatabase, DecodingError is now Decoding,InvalidNetworkError is now InvalidNetwork. The MapError variant hasMmap (under the mmap feature flag). Code explicitlyMaxMindDbError no longer implements PartialEq.std::io::Error (nowIo and Mmap variants) do not implement PartialEq.== or assert_eq! must bematches! or by matching on the errorMaxMindDbError handling using the thiserror crate.Io, Mmap, and InvalidNetwork now directly wrapstd::io::Error, ipnetwork::IpNetworkError).Io, Mmap, InvalidNetwork) nowstd::error::Error::source(), allowing inspectionDisplay implementation for MaxMindDbError has been refined tolookup_prefix now returns the prefix length of the entry even when theSerde will now skip serialization of the GeoIP2 struct fields when Option is none. Pull request by Stefan Sundin. GitHub #79 .
Option is none. Pull request by Stefan Sundin. GitHub #79.Serialize and Clone were added to the Metadata struct. Pullsimdutf8 as a faster alternative whenunsafe-str-decode is too risky. Pull request by Jakub Onderka.Added the is_anycast field to the Traits struct. Pull request by Skye. GitHub #73.
is_anycast field to the Traits struct. Pull request by Skye.
GitHub #73.Added lookup_prefix to return the prefix length for the network associated with the IP address. Pull request by Marek Vavruša. GitHub #26.
lookup_prefix to return the prefix length for the network associated
with the IP address. Pull request by Marek Vavruša. GitHub #26.A within method has been added to the reader to allow iterating over all records in the database. Pull request by Ross McFarland. Github #50.
within method has been added to the reader to allow iterating over all
records in the database. Pull request by Ross McFarland. Github #50.maxminddb::geoip2 have been updated. Most noticeably,
an Enterprise struct has been added and the model module has been
replaced by city and country modules. Also, several missing fields have
been added.Mmap is now re-exported for convenience. Pull request by zhuhaow. GitHub
#54.Reduce the amount of code generated by shrinking generic methods. Pull request by Markus Westerlind. GitHub #49.
Use try_into when decoding floating point values. Pull request by Sebastian Mayr. GitHub #47.
try_into when decoding floating point values. Pull request by Sebastian
Mayr. GitHub #47.Switch from memmap to memmap2. Pull request by Gleb Pomykalov. GitHub
memmap to memmap2. Pull request by Gleb Pomykalov. GitHub
#46.The memchr crate is now used to improve the performance of finding the metadata start. Pull request by Markus Westerlind. GitHub #44.
memchr crate is now used to improve the performance of finding the
metadata start. Pull request by Markus Westerlind. GitHub #44.Correct handling of pointers in the database metadata section. This bug caused the latest GeoIP2 ISP database from MaxMind to fail to load with an Inv
InvalidDatabaseError due to an invalid data type. Reported by
Marwes-Imperva. GitHub #45.- Minor cleanup.
Restore compatibility with targets that don't support 128-bit integers. Pull request by Filip. GitHub #41.
Unsigned 128-bit integers are now decoded to a u128 rather than a [u8]. Pull request by moschroe. GitHub #40.
u128 rather than a [u8].
Pull request by moschroe. GitHub #40.This release includes major performance improvements and code cleanup. Pull request by Sebastian Mayr. GitHub #37.
Remove crate options leftover from before Rust 1.0. In particular, this crate no longer specifies crate_type. This should allow you to compile it with
crate_type. This should allow you to compile it with
panic = "abort". Reported by ye2020. GitHub #33.BREAKING CHANGE: All Strings in the geoip2 structs are not returned as references. This was done to provide a significant performance improvement when…
geoip2 structs are not returned as
references. This was done to provide a significant performance improvement
when ownership is not needed. Pull request by Matthew Wynn. GitHub #31.unsafe-str-decode, has been added that will skip
UTF-8 validation when decoding strings. You should only use this when you
trust that the MaxMind DB is valid and contains valid UTF-8 strings. This
provides a modest performance improvement. Pull request by Matthew Wynn.
GitHub #31.Missing models for DensityIncome, Domain, and Asn were added and the missing is_in_european_union field was added to the Country model. Pull request b
DensityIncome, Domain, and Asn were added and the
missing is_in_european_union field was added to the Country model. Pull
request by Sebastian Nadorp. GitHub #19.Display implementation for
MaxMindDBError. Pull request by Mike Cooper. GitHub #20.Reader::open has been removed. You should use Reader::open_readfile or Reader::open_mmap. Pull request by kpcyrd. GitHub #17 & #18.
Reader::open has been removed. You should use Reader::open_readfile or
Reader::open_mmap. Pull request by kpcyrd. GitHub #17 & #18.Reader::open_readfile no longer depends on unsafe. Pull request by
kpcyrd. GitHub #17 & #18.An optional mmap cfg feature flag has been added. When set, open will use the memmap crate to memory map the database file rather than reading it from
mmap cfg feature flag has been added. When set, open will use
the memmap crate to memory map the database file rather than reading it
from file. In addition to open, open_readfile and open_mmap are
available. PR by moschroe. GitHub #16.Reader::open now takes an AsRef<Path>. Also, #16.Reader::from_buf allows using an existing buffer instead of specifying a
database file. PR by kpcyrd. GitHub #15.Derive Serialize for GeoIP2 models. Pull request by Bryan Gilbert. GitHub
Serialize for GeoIP2 models. Pull request by Bryan Gilbert. GitHub
#11.Update logger to 0.4 and env_logger to 0.5.
Implement unimplemented deserialize methods.
API CHANGE: Switch to Serde for deserialization. Data structures being deserialized to must implement the Deserialize trait. Pull request by Wesley Mo
Deserialize trait. Pull request by
Wesley Moore. GitHub #5.Update log to 0.3.7 and rustc-serialize to 0.3.23.
log to 0.3.7 and rustc-serialize to 0.3.23.Update rustc-serialize to 0.3.21.
rustc-serialize to 0.3.21.API CHANGE: lookup takes an IpAddr again instead of a SocketAddr. We previously switched to SocketAddr after IpAddr had been deprecated, but it has si…
lookup takes an IpAddr again instead of a SocketAddr. We
previously switched to SocketAddr after IpAddr had been deprecated, but
it has since been re-added.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →