marselester/maxminddb.zig
MaxMind DB format reader in Zig.
This Zig package reads the MaxMind DB format. It's based on maxminddb-rust implementation.
You'll need MaxMind-DB/test-data to run examples and tests.
$ 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 = スウェーデン王国
Add maxminddb.zig as a dependency in your build.zig.zon
.
$ zig fetch --save git+https://github.com/marselester/maxminddb.zig#master
Add the maxminddb
module as a dependency in your build.zig
:
const mmdb = b.dependency("maxminddb", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("maxminddb", mmdb.module("maxminddb"));
See examples.