Registry / networking / dns-lookup

dns-lookup

JSON →
library3.0.1rscratesunverified

A simple DNS resolving API with getaddrinfo and getnameinfo wrappers for libc variants.

# Cargo.toml [dependencies] dns-lookup = "3.0.1"
INSTALL
IMPORT
SIG · DNS-LOOKUP
D
dns-lookup
networkingrustv3.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lookup_host
use dns_lookup::lookup_host;

Resolves a hostname to IP addresses using the system's DNS resolver.

use dns_lookup::lookup_host; fn main() -> Result<(), Box<dyn std::error::Error>> { let ips = lookup_host("example.com")?; for ip in ips { println!("{}", ip); } Ok(()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Meta
1
Amazon
1
Resources
dns-lookup — cargo add dns-lookup · libregistry