miekg/dns is a DNS library in Go that provides complete support for DNS protocol implementation on both client and server sides.
The library solves the problem of building DNS applications by offering a lean, minimal API that exposes the DNS protocol directly rather than hiding complexity behind convenience functions. It supports all Resource Record types including DNSSEC types and follows a philosophy where if something is straightforward to code in Go, the library does not provide a wrapper function for it. This approach allows developers to build DNS servers, resolvers, and other DNS tools with direct control over protocol details.
The tool suits developers who need to implement DNS functionality and prefer explicit control over abstraction. It is appropriate for projects ranging from DNS servers and resolvers to DNS inspection and management tools. The library maintains stability by supporting the last two versions of Go and aims to keep the master branch aligned with DNS standards while avoiding breaking changes where possible.
The project is in maintenance mode, with a newer version available elsewhere that offers approximately double the performance. The original repository will receive only specific fixes going forward and is planned for eventual archival. The codebase emphasizes simplicity and speed as core design goals, with a small API surface that avoids redundant functionality.