Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS name resolution more than getaddrinfo() #8925

Closed
sanxiyn opened this issue Sep 2, 2013 · 13 comments
Closed

DNS name resolution more than getaddrinfo() #8925

sanxiyn opened this issue Sep 2, 2013 · 13 comments

Comments

@sanxiyn
Copy link
Member

sanxiyn commented Sep 2, 2013

There should be a way to do DNS name resolution in the standard library.

@lucab
Copy link
Contributor

lucab commented Sep 2, 2013

Apart from libc one, libuv also has a getaddrinfo, and I think it would be good to also expose/wrap that.

@brson
Copy link
Contributor

brson commented Sep 5, 2013

cc #9000

@brson brson removed their assignment Feb 10, 2014
@brson
Copy link
Contributor

brson commented Apr 21, 2014

@alexcrichton Is this done?

@alexcrichton
Copy link
Member

I think the simple aspect is done, but getaddrinfo (which is all we're built on) is pretty inadequate for any flavorful use of DNS.

I believe that we have the bare bones ability to work, but "fancy dns" like dealing with MX records would require a full DNS implementation (not currently present).

I do not think this is a 1.0 blocker, this is more of an interesting project at this point.

@alexcrichton alexcrichton changed the title DNS name resolution DNS name resolution more than getaddrinfo() Apr 21, 2014
@alexcrichton
Copy link
Member

(updated title a bit)

@mcpherrinm
Copy link
Contributor

I need bulk DNS lookup for a project I'm working on in Rust, and would like to make a more fully featured DNS resolver. If what I need overlaps with what would be acceptable for use in the standard library, that work could of course be shared.

What's the scope of things that could be included in the standard library? There's a few different things a "DNS Resolver" library could encompass:

  • A library for handling the DNS wire format
  • A souped up getaddrinfo (ie, blocking function) that can do arbitrary record types
  • A library for the host OS dns configuration: resolvers, hosts, search domains.
  • An asyncronous API for doing multiple simultanous lookups
  • DNSSEC / DNSCurve support

Binding an external library like libunbound is certainly a possibility to get everything but the host OS config, but adds dependencies for Rust. Any other way probably wouldn't include DNSSEC support.

The async API is most useful to me, as I'd like to have hundreds of DNS requests in flight at least. But most existing rust APIs are not async, so I'd like some guidance on what's appropriate for inclusion.

@alexcrichton
Copy link
Member

If a DNS library were to encompass all of the features you listed, I would likely expect it to be its own separate library. We could include the library in the libstd facade to reexport it in the standard library, but I don't think all of that functionality belongs in the standard library itself (just as channels are no longer there).

Does that make sense to you? This sounds awesome though! I'd love to get some more flavorful DNS support.

@mcpherrinm
Copy link
Contributor

I'm going to start working on this outside the standard library (and put it in cargo).

@alexcrichton
Copy link
Member

Awesome! Thanks!

@zmack
Copy link

zmack commented Oct 19, 2014

@mcpherrinm did you get around to writing any code for this?

Kind of interested in a similar feature myself.

@mcpherrinm
Copy link
Contributor

@zmack I haven't yet; the project that required DNS is on the back-burner right now.

@He-Pin
Copy link

He-Pin commented Dec 8, 2014

need to async

@steveklabnik
Copy link
Member

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants