Trust-DNS 0.18 (async/await + Tokio 0.2 support)

It's so exciting to be able to announce the release of Trust-DNS 0.18. While this doesn't carry any new DNS features, it does bring a huge ergonomic improvement to offer an async/await API for the Resolver and the Client. This release makes Trust-DNS compatible with Tokio 0.2 and Futures 0.3. There a very large number of breaking changes, but most shouldn't be significantly different from previous usage. One very large change to draw your attention to is that the Client crate has been renamed to trust-dns-client and the named binary is now part of the trust-dns crate. This was done to fix a branding issue where people were often confused about which package should be used to install the named process. Additionally, the versioning has been unified across all the Trust-DNS crates. This should make the versions a little easier to understand, rather than the split versioning before.

I really want to thank the folks working on the Rust async/await features, Tokio, and Futures for paving this path so elegantly that all that was needed was to rewrite Trust-DNS with minimal PRs to other projects. We did need to wait for some dependencies to be updated to support the new Future types, but everything was pretty much ready.

It took a lot longer than anticipated to get here, but it's extremely exciting to have made it. I highly encourage folks to start exploring async/await and async IO in Rust. Please enjoy. (I also wrote a quick blog post about this)



  • (all) is now merged from the Resolver crate and the top-level. All notes from the Resolver CHANGELOG were merged into this changelog, with the format ## {version} (Resolver) and the existing notes from the top-level are formatted as ## {version} (Client/Server. This should make notes on releases easier. Going forward the scope of changes across crates will be captured as - ({crate}) {note} where all is used for across the board updates.
  • (all) After the 0.18 release, all crates will be versioned uniformally, and released at the same time, this will resolve some issues around consistency with releases. The final Resolver release before this was 0.12.
  • breaking Generally, any interface that took a 0.1 Future, now returns or consumes a std::future::Future
  • breaking (client) rebranded from trust-dns to trust-dns-client
  • breaking (named) moved from trust-dns-server to trust-dns, in bin/**
  • breaking (all) all internals updated to std::future and async/await (requires Rust 1.39 minimum)
  • breaking (client) AsyncClient now returns a connect future which resolves to the client and it's background.
  • breaking (resolver) AsyncResolver::new changed to AsyncResolver::connect, requires awaiting the returned future
  • (client) ClientFuture renamed to AsyncClient
  • (resolver) AsyncResolver now requires a ConnectionProvider type parameter, see TokioAsyncResolver as a predefined type without it
  • (resolver) Now returns a connect future to connect the start all background tasks
  • (proto, resolver) renamed the tokio-compat feature to tokio-runtime
  • (all) added cargo-make Makefile.toml to support all automation in Github workflow
  • (proto) renamed SecureDnsHandle to DnssecDnsHandle
  • (client) renamed SecureSyncClient to SyncDnssecClient
  • Abstractions around Tokio for generic Executors #960 (@chunyingw)
  • Enable early data on tokio-rustls #911 (@daareiza)


  • (proto) Removed deadlock from UDPSocket stream impl
  • (named) made tests a little more resilient to port stealing
  • (proto) Unknown ResponseCodes will no longer cause a panic


  • (client) client::BasicClientHandle, ClientFuture no longer requires Background or the separate Handle, this can generally be replaced with just ClientFuture itself in most use cases.
  • breaking (resolver) Background type removed
  • (resolver) removed deprecated AsyncResolver::lookup_service, see AsyncResolver::lookup_srv
  • (client) removed all deprecated reexports from trust_dns_proto
  • (proto) removed unused xfer::BasicDnsHandle, xfer::MessageStreamHandle
  • (resolver) removed all unused custom LookupFuture types SrvLookupFuture, ReverseLookupFuture, Ipv4LookupFuture, Ipv6LookupFuture, MxLookupFuture, TxtLookupFuture, SoaLookupFuture, NsLookupFuture
  • (resolver) removed Background, BackgroundLookup, and BackgroundLookupIp
  • (resolver|client) DoH no longer sends User-Agent header #962 (@quininer)


  • (proto) proto now has a testing feature to allow dependencies that might want access to some of the testing harnesses. #936 (@chunyingw)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.