#dns #tokio #name #service #discovery


Abstract name service traits for use with futures (and tokio)

14 releases

Uses old Rust 2015

0.4.3 Feb 19, 2018
0.4.2 Nov 24, 2017
0.4.1 Oct 24, 2017
0.3.4 May 31, 2017
0.1.0 Feb 12, 2016

#497 in Asynchronous

Download history 39/week @ 2022-11-29 101/week @ 2022-12-06 75/week @ 2022-12-13 92/week @ 2022-12-20 63/week @ 2022-12-27 18/week @ 2023-01-03 82/week @ 2023-01-10 45/week @ 2023-01-17 120/week @ 2023-01-24 147/week @ 2023-01-31 55/week @ 2023-02-07 118/week @ 2023-02-14 116/week @ 2023-02-21 103/week @ 2023-02-28 71/week @ 2023-03-07 85/week @ 2023-03-14

391 downloads per month
Used in 13 crates (11 directly)


803 lines

Abstract Name Service

Status: Beta

Documentation | Github | Crate

This rust crate provides just abstract traits which may be used to build interoperable implementations of name dicovery.

We want abstract_ns to have implementations not only for DNS-based name discovery but also Zookeeper, Eureka, Etcd, Consul, and whatever other thing you might imagine. All of them easily configured and interchangeable.


  • Defines what is a name and what is a result of service discovery
  • Uses futures-rs for asynchronous stuff
  • Has interface to receive updates (name changes)
  • Allows some kind of name service routing, i.e. has a way to specify different resolvers for different names, for example: serve *.consul from local consul, other names from conventional DNS servers.

This repository also contains the following crates:

  • ns-std-threaded a name resolution implementation that uses stdlib resolver running in a thread pool
  • ns-dns-tokio an pure-rust implementation that uses domain crate to resolve domains asynchronously in tokio-core main loop

Note: abstract-ns v0.2 is very different product than v0.1


Licensed under either of


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.