[GH-ISSUE #1648] Rust errors when enabling dns-over-https feature #724

Closed
opened 2026-03-15 23:59:44 +03:00 by kerem · 3 comments
Owner

Originally created by @williamdes on GitHub (Feb 27, 2022).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1648

Describe the bug

It's possible that part of the issue would need rustls to be added as an optional dependency like h2 is 🤷🏻‍♂️

   Compiling trust-dns-client v0.21.0 (/workspace/crates/client)
error[E0432]: unresolved import `rustls`
  --> crates/client/src/https_client_connection.rs:14:5
   |
14 | use rustls::ClientConfig;
   |     ^^^^^^ help: a similar path exists: `trust_dns_proto::rustls`

   Compiling trust-dns-resolver v0.21.0 (/workspace/crates/resolver)
   Compiling trust-dns-native-tls v0.21.0 (/workspace/crates/native-tls)
   Compiling trust-dns-https v0.21.0 (/workspace/crates/https)
   Compiling trust-dns-rustls v0.21.0 (/workspace/crates/rustls)
For more information about this error, try `rustc --explain E0432`.
error: could not compile `trust-dns-client` due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0432]: unresolved import `crate::tls`
 --> crates/resolver/src/https.rs:4:12
  |
4 | use crate::tls::CLIENT_CONFIG;
  |            ^^^ could not find `tls` in the crate root

error[E0432]: unresolved import `crate::config::TlsClientConfig`
  --> crates/resolver/src/https.rs:10:5
   |
10 | use crate::config::TlsClientConfig;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TlsClientConfig` in `config`

error[E0425]: cannot find value `client_config` in this scope
   --> crates/resolver/src/name_server/connection_provider.rs:195:21
    |
195 |                     client_config,
    |                     ^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.

To Reproduce
Clone https://github.com/trust-dns/docker
Edit alpine/Dockerfile to add the feature dns-over-https on line 20

Expected behavior
Build

System:

  • OS:Alpine 3.14
  • rustc version: 1.59

Same as for #1647

Version:
Version: 0.21.0

Additional context
Feature: dns-over-https

Originally created by @williamdes on GitHub (Feb 27, 2022). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1648 **Describe the bug** It's possible that part of the issue would need `rustls` to be added as an optional dependency like `h2` is 🤷🏻‍♂️ ``` Compiling trust-dns-client v0.21.0 (/workspace/crates/client) error[E0432]: unresolved import `rustls` --> crates/client/src/https_client_connection.rs:14:5 | 14 | use rustls::ClientConfig; | ^^^^^^ help: a similar path exists: `trust_dns_proto::rustls` Compiling trust-dns-resolver v0.21.0 (/workspace/crates/resolver) Compiling trust-dns-native-tls v0.21.0 (/workspace/crates/native-tls) Compiling trust-dns-https v0.21.0 (/workspace/crates/https) Compiling trust-dns-rustls v0.21.0 (/workspace/crates/rustls) For more information about this error, try `rustc --explain E0432`. error: could not compile `trust-dns-client` due to previous error warning: build failed, waiting for other jobs to finish... error[E0432]: unresolved import `crate::tls` --> crates/resolver/src/https.rs:4:12 | 4 | use crate::tls::CLIENT_CONFIG; | ^^^ could not find `tls` in the crate root error[E0432]: unresolved import `crate::config::TlsClientConfig` --> crates/resolver/src/https.rs:10:5 | 10 | use crate::config::TlsClientConfig; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TlsClientConfig` in `config` error[E0425]: cannot find value `client_config` in this scope --> crates/resolver/src/name_server/connection_provider.rs:195:21 | 195 | client_config, | ^^^^^^^^^^^^^ not found in this scope Some errors have detailed explanations: E0425, E0432. For more information about an error, try `rustc --explain E0425`. ``` **To Reproduce** Clone https://github.com/trust-dns/docker Edit `alpine/Dockerfile` to add the feature `dns-over-https` on line 20 **Expected behavior** Build **System:** - OS:Alpine 3.14 - rustc version: 1.59 Same as for #1647 **Version:** Version: 0.21.0 **Additional context** Feature: `dns-over-https`
kerem closed this issue 2026-03-15 23:59:49 +03:00
Author
Owner

@bluejekyll commented on GitHub (Feb 27, 2022):

This is described here on the readme: https://github.com/bluejekyll/trust-dns#dns-over-tls-and-dns-over-https

basically, the feature you want is dns-over-https-rustls

<!-- gh-comment-id:1053716528 --> @bluejekyll commented on GitHub (Feb 27, 2022): This is described here on the readme: https://github.com/bluejekyll/trust-dns#dns-over-tls-and-dns-over-https basically, the feature you want is `dns-over-https-rustls`
Author
Owner

@bluejekyll commented on GitHub (Feb 28, 2022):

Is this resolved along with #1647 now?

<!-- gh-comment-id:1053877978 --> @bluejekyll commented on GitHub (Feb 28, 2022): Is this resolved along with #1647 now?
Author
Owner

@williamdes commented on GitHub (Feb 28, 2022):

Is this resolved along with #1647 now?

Yes, thank you 🚀
https://github.com/trust-dns/docker/actions/runs/1909126348

<!-- gh-comment-id:1054002230 --> @williamdes commented on GitHub (Feb 28, 2022): > Is this resolved along with #1647 now? Yes, thank you 🚀 https://github.com/trust-dns/docker/actions/runs/1909126348
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#724
No description provided.