$ maxminddb
v0.27.1Library for reading MaxMind DB format used by GeoIP2 and GeoLite2
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(())
}
Links • https://crates.io/crates/maxminddb • http://docs.rs/maxminddb • https://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
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add maxminddbOr add to Cargo.toml: maxminddb = "0.27.1"