$ maxminddb

v0.27.1

Library for reading MaxMind DB format used by GeoIP2 and GeoLite2

Downloads: 17.8M
Recent: 2.9M
Versions: 52
Updated: December 18, 2025

Latest Update Summary

Crate

Name: maxminddb New version: 0.27.0 Release date: 2025-11-28T18:53:52.358925Z

Crate readme

Short description This library reads the MaxMind DB format, including the GeoIP2 and GeoLite2 databases.

Long description The crate allows reading of MaxMind DB files, facilitating access to GeoIP2 and GeoLite2 databases. It manages test data within a git submodule and includes features such as memory-mapped file access and SIMD-accelerated UTF-8 validation. The crate provides an interface for looking up geographic data by IP address, ensuring a straightforward usage pattern.

Features • mmap • simdutf8 • unsafe-str-decode

Code Examples Add to Cargo.toml

 [dependencies]
maxminddb = "0.27"

Basic usage

 use maxminddb::{geoip2, Reader};
use std::net::IpAddr;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let reader = Reader::open_readfile("/path/to/GeoLite2-City.mmdb")?;

    let ip: IpAddr = "89.160.20.128".parse()?;
    let result = reader.lookup(ip)?;

    if let Some(city) = result.decode::<geoip2::City>()? {
        println!("Country: {}", city.country.iso_code.unwrap_or("N/A"));
        println!("City: {}", city.city.names.english.unwrap_or("N/A"));
    }

    Ok(())
}

Linkshttps://crates.io/crates/maxminddbhttp://docs.rs/maxminddbhttps://dev.maxmind.com/geoip/geoip2/geolite2/http://www.gnuplot.info/

https://docs.rs/maxminddb https://api.github.com/repos/oschwald/maxminddb-rust/releases/266059806

Release info

Release version:

Release description

Code Examples

Patch update: 0.27.0 → 0.27.1

$ DOWNLOADS TREND

15.5M17.8M

$ VERSION HISTORY

v0.27.1December 18, 2025
v0.27.0November 28, 2025
v0.26.0March 28, 2025

$ LINKS

$ INSTALL

cargo add maxminddb

Or add to Cargo.toml: maxminddb = "0.27.1"