// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT const std = @import("std"); pub const Diagnostics = @import("Diagnostics.zig"); pub const Lexer = @import("Lexer.zig"); pub const Parser = @import("Parser.zig"); pub const Zone = @import("Zone.zig"); pub const name = @import("name.zig"); pub const rdata_text = @import("rdata_text.zig"); pub const write = @import("write.zig"); /// The message library underneath, re-exported so that a program using this /// one needs a single dependency to reach `dns.Record`, `dns.Type` and the /// rest of what a zone is made of. Everything here hands back records, and a /// record is that library's. pub const dns = @import("dns"); /// The address library underneath, for the same reason: the data of an `a` /// record is a `z46.Ipv4Address`, and building one to add to a zone means /// naming that type. pub const z46 = @import("z46"); test { std.testing.refAllDecls(@This()); } test "the libraries re-exported here are the ones the records are made of" { // Zig's build graph caches a dependency on its build root *and its // options*, so two packages that pin the same commit and take it the same // way arrive at one module -- and two that do not arrive at two types with // the same name, which a consumer meets as being unable to hand a record // from one library to the other. This says out loud that it has not // happened here, and would fail the day a pin drifts. comptime std.debug.assert(z46.Ipv4Address == @FieldType(dns.rdata.Data, "a")); comptime std.debug.assert(z46.Ipv6Address == @FieldType(dns.rdata.Data, "aaaa")); }