A minimal DNS library & stub/recursive resolver
BarTop is an educational DNS toolkit written in Zig.
It includes
dns.zig
- a Wire-format encoder/decoder able to read & write common RR types (A, AAAA, NS, CNAME, MX, PTR, TXT, SOA, …)zone.zig
- a reader for RFC 1035 master files supporting$ORIGIN
/$TTL
and incremental state trackingsrc/client.zig
- a dns client CLI that crafts a query, sends it over UDP, and prints the decoded answersrc/stub_resolver.zig
- an experimental stub resolver built onlibxev
with an in-memory LRU cachesrc/util/crypto.zig
- tools for creating RSA/ECDSA keypairs and signing messages with them, using openSSL libcrypto- Utilities
src/util/lru.zig
(cache) andsrc/util/queue.zig
- Simple build script +
build.zig.zon
dependency list (libxev, zig-clap, openSSL)
Status: personal project, API in flux, not production-ready.
Automatically generated API Reference for the project can be found at https://joeypas.github.io/BarTop. Note that Zig autodoc is in beta; the website may be broken or incomplete.
BarTop targets Zig 0.14.x
git clone https://github.com/joeypas/BarTop.git
cd BarTop
zig build # Debug mode contains logs, ReleaseFast doesn't