There is a breaking change coming in TRust-DNS in 0.10.0. I wanted to post here about it in case there are any users that may have a dependency on the client library. I had initially deprecated the old synchronous client in favor of people using the tokio based client instead. After reaching out to a few users, I realized that keeping a synchronous client for ease of use is probably going to be best.

What is changing is that I’m dropping the old implementation of the Client and replacing it with trait based implementations over ClientFuture . There are two impls for the Client trait: SyncClient and SecureSyncClient .

The Client trait has a compatible interface with the old Client , example of query(...) :

fn query(&self, name: &Name, query_class: DNSClass, query_type: RecordType) -> ClientResult<Message>

and the new version:

fn query(&self, name: &Name, query_class: DNSClass, query_type: RecordType) -> ClientResult<Message> { ... }

Those are identical! But to use them you either need to use it with either the new SyncClient or the SecureSyncClient , that is there will be a compile time failure and you’ll need to switch to use one of these new variants. The secure variant implements DNSSec extensions, and validates records via DNSSec (only returning verified records). The SecureSyncClient is the variant that implements:

#[deprecated] fn secure_query(&self, query_name: &Name, query_class: DNSClass, query_type: RecordType) -> ClientResult<Message>

So if you used that function, you’ll need the SecureSyncClient . A warning though, SecureSyncClient enables DNSSec on both query(...) and secure_query(...) which is a change from the original client, where only secure_query(...) would have performed DNSSec validation.

In addition to these changes, the dynamic DNS functions have been updated to take a generic option over an IntoRecordSet trait:

fn create<R>(&self, rrset: R, zone_origin: Name) -> ClientResult<Message> where R: IntoRecordSet

This will allow for an entire record set to be used in all dynamic DNS requests, as opposed to the original which only allowed for a single Record . This should be 100% backward compatible, with the caveat from above of using the new Client variants.

You can see all these changes in the master branch: https://github.com/bluejekyll/trust-dns/blob/master/client/src/client/client.rs

If you’re a user and any of these changes look like they’ll be issues, please reach out to me ASAP, thanks.