- Notifications
You must be signed in to change notification settings - Fork53
oschwald/maxminddb-rust
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This library reads the MaxMind DB format, including the GeoIP2 and GeoLite2databases.
To build everything:
cargo buildThis crate manages its test data within a git submodule.To run the tests, you will first need to run the following command.
git submodule update --init
Add this to yourCargo.toml:
[dependencies]maxminddb ="0.26"
and this to your crate root:
externcrate maxminddb;
The API docs are onDocs.rs.
Seeexamples/lookup.rs for a basic example.
The projects include benchmarks usingCriterion.rs.
First you need to have a working copy of the GeoIP City database.You can fetch it fromhere.
Place it in the root folder asGeoIP2-City.mmdb.
Once this is done, run
cargo benchIfgnuplot is installed, Criterion.rs can generatean HTML report displaying the results of the benchmark undertarget/criterion/report/index.html.
Result of doing 100 random IP lookups:
Contributions welcome! Please fork the repository and open a pull requestwith your changes.
This is free software, licensed under the ISC license.
About
Rust MaxMind DB Reader
Resources
License
Uh oh!
There was an error while loading.Please reload this page.