Add std/net DNS lookup helpers#114
Merged
Merged
Conversation
Contributor
Greptile SummaryThis PR adds DNS lookup helpers to
Confidence Score: 5/5This looks safe to merge.
Reviews (4): Last reviewed commit: "Make std net DNS example opt-in" | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the DD-046 DNS slice for
std/net:dns_lookup(name, record_type?, opts?) -> Result<Array<Map>, String>record_typetoA.A,AAAA,ANAME,CAA,CDNSKEY,CDS,CNAME,CSYNC,DNSKEY,DS,HINFO,HTTPS,KEY,MX,NAPTR,NS,NSEC,NSEC3,NSEC3PARAM,NULL,OPENPGPKEY,PTR,RRSIG,SIG,SOA,SRV,SSHFP,SVCB,TLSA,TXT.ANY,AXFR,IXFR,OPT,TSIG, andZEROrather than treating them as normal app-level lookups.type,name,value, andttl.dns_reverse(ip, opts?) -> Result<Array<String>, String>Ok([])and invalid input / resolver setup / transport failures asErr(String).examples/std_net_dns.tnt.Test Plan
cargo fmt -- --checkgit diff --checkcargo check --profile dev-releasecargo test --lib stdlib::net::tests -- --nocapturecargo test --test std_net_tests -- --nocapturecargo test --test type_checker_tests std_net_phase1 -- --nocapturecargo build --profile dev-release && ./target/dev-release/ntnt docs --generate./target/dev-release/ntnt validate examples/./target/dev-release/ntnt lint examples/std_net_dns.tntcargo testNTNT_NET_EXTERNAL_DNS_TESTS=1 cargo test --test std_net_tests dns_lookup_external_smoke_is_opt_in -- --nocaptureNotes
External DNS smoke coverage stays opt-in so default CI is deterministic and does not depend on public DNS/network availability.