BunDns
Bun implementation of Effect's Dns service.
Address lookups use Bun.dns.lookup with the system backend, which calls
the operating system resolver (getaddrinfo) and therefore also reads the
hosts file. Bun's node:dns lookup uses c-ares instead, which bypasses the
system's name service configuration. Record queries and reverse lookups use
NodeDns.resolver without the UTF-8 correction of NodeDns.make,
because Bun already decodes TXT and CAA character strings as UTF-8.
Gotchas
Bun returns each character string of a TXT record as a separate record, so a record made of several strings arrives as several TXT records whose chunks cannot be reassembled (https://github.com/oven-sh/bun/issues/44692).
Bun's resolver cannot query TLSA records, so TLSA queries fail with
Unsupported.
Constructors
Layers
Layer that provides the Bun Dns service using the system resolver
configuration.
Signature
declare const layer: Layer.Layer<Dns.Dns>Creates a layer that provides the Bun Dns service with options read
from configuration.
Signature
declare function layerConfig(options: Config<Options>): Layer<Dns, ConfigError | NetAddressError>Other
Options
typeSignature
type Options = any