https://github.com/marselester/maxminddb.zig
MaxMind DB format reader in Zig.
https://github.com/marselester/maxminddb.zig
maxmind maxmind-db zig zig-package
Last synced: about 1 month ago
JSON representation
MaxMind DB format reader in Zig.
- Host: GitHub
- URL: https://github.com/marselester/maxminddb.zig
- Owner: marselester
- License: isc
- Created: 2025-02-14T00:32:15.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-03-07T23:10:56.000Z (3 months ago)
- Last Synced: 2025-04-05T13:42:51.220Z (about 2 months ago)
- Topics: maxmind, maxmind-db, zig, zig-package
- Language: Zig
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zig MaxMind DB Reader
This Zig package reads the [MaxMind DB format](https://maxmind.github.io/MaxMind-DB/).
It's based on [maxminddb-rust](https://github.com/oschwald/maxminddb-rust) implementation.You'll need [MaxMind-DB/test-data](https://github.com/maxmind/MaxMind-DB/tree/main/test-data) to run examples and tests.
```sh
$ git submodule update --init
$ zig build test
$ zig build example_lookup
zh-CN = 瑞典
de = Schweden
pt-BR = Suécia
es = Suecia
en = Sweden
ru = Швеция
fr = Suède
ja = スウェーデン王国
```## Quick start
Add maxminddb.zig as a dependency in your `build.zig.zon`.
```sh
$ zig fetch --save git+https://github.com/marselester/maxminddb.zig#master
```Add the `maxminddb` module as a dependency in your `build.zig`:
```zig
const mmdb = b.dependency("maxminddb", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("maxminddb", mmdb.module("maxminddb"));
```See [examples](./examples/).