[PR #2464] [MERGED] Move RuntimeProvider into proto #3062

Closed
opened 2026-03-16 11:23:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2464
Author: @djc
Created: 9/17/2024
Status: Merged
Merged: 9/19/2024
Merged by: @djc

Base: mainHead: futures


📝 Commits (6)

  • bd7f804 Use std futures where possible
  • 19bcb93 proto: invert branch to linearize function
  • 7a2063a proto: move runtime code into a module
  • d3bc5e5 Move RuntimeProvider into proto
  • 3350c02 proto: use RuntimeProvider to build UDP stream
  • 08facf8 proto: make sure to always poll future

📊 Changes

69 files changed (+872 additions, -883 deletions)

View changed files

📝 bin/benches/comparison_benches.rs (+7 -6)
📝 bin/tests/integration/named_https_tests.rs (+2 -2)
📝 bin/tests/integration/named_quic_tests.rs (+1 -1)
📝 bin/tests/integration/named_rustls_tests.rs (+4 -4)
📝 bin/tests/integration/named_test_rsa_dnssec.rs (+4 -4)
📝 bin/tests/integration/named_tests.rs (+27 -25)
📝 crates/async-std-resolver/src/runtime.rs (+2 -3)
📝 crates/async-std-resolver/src/tests.rs (+1 -1)
📝 crates/async-std-resolver/src/time.rs (+1 -1)
📝 crates/client/src/client/async_client.rs (+2 -2)
📝 crates/client/src/client/async_secure_client.rs (+1 -1)
📝 crates/client/src/h2_client_connection.rs (+1 -1)
📝 crates/client/src/lib.rs (+1 -1)
📝 crates/client/src/tcp/tcp_client_connection.rs (+2 -2)
📝 crates/client/src/udp/udp_client_connection.rs (+5 -4)
📝 crates/proto/src/h2/h2_client_stream.rs (+2 -2)
📝 crates/proto/src/h3/h3_client_stream.rs (+2 -2)
📝 crates/proto/src/lib.rs (+1 -164)
📝 crates/proto/src/multicast/mdns_client_stream.rs (+4 -2)
📝 crates/proto/src/multicast/mdns_stream.rs (+4 -3)

...and 49 more files

📄 Description

Looking at the code in #2462 I wasn't very happy with the abstractions so I started pulling on some threads. This resulted in moving the RuntimeProvider from the resolver crate to proto, which IMO makes more sense as it doesn't have any dependencies on resolver code. The last commit makes the same change as #2462 but IMO does so in a cleaner way.

cc @mokeyish would be happy to get your feedback!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2464 **Author:** [@djc](https://github.com/djc) **Created:** 9/17/2024 **Status:** ✅ Merged **Merged:** 9/19/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `futures` --- ### 📝 Commits (6) - [`bd7f804`](https://github.com/hickory-dns/hickory-dns/commit/bd7f8045fbc1e11c7e641c42362523b1273b4175) Use std futures where possible - [`19bcb93`](https://github.com/hickory-dns/hickory-dns/commit/19bcb935410fbae5121df97242180fcf00ddf22a) proto: invert branch to linearize function - [`7a2063a`](https://github.com/hickory-dns/hickory-dns/commit/7a2063afbb66816b8d692ff2288c7b577130d2eb) proto: move runtime code into a module - [`d3bc5e5`](https://github.com/hickory-dns/hickory-dns/commit/d3bc5e5621a95e871fbd78ced5430d77d4525dd0) Move RuntimeProvider into proto - [`3350c02`](https://github.com/hickory-dns/hickory-dns/commit/3350c021cbd776da06dd84c258155a89d602fe17) proto: use RuntimeProvider to build UDP stream - [`08facf8`](https://github.com/hickory-dns/hickory-dns/commit/08facf83b1317607e99de5549a8fc176aad6a5a1) proto: make sure to always poll future ### 📊 Changes **69 files changed** (+872 additions, -883 deletions) <details> <summary>View changed files</summary> 📝 `bin/benches/comparison_benches.rs` (+7 -6) 📝 `bin/tests/integration/named_https_tests.rs` (+2 -2) 📝 `bin/tests/integration/named_quic_tests.rs` (+1 -1) 📝 `bin/tests/integration/named_rustls_tests.rs` (+4 -4) 📝 `bin/tests/integration/named_test_rsa_dnssec.rs` (+4 -4) 📝 `bin/tests/integration/named_tests.rs` (+27 -25) 📝 `crates/async-std-resolver/src/runtime.rs` (+2 -3) 📝 `crates/async-std-resolver/src/tests.rs` (+1 -1) 📝 `crates/async-std-resolver/src/time.rs` (+1 -1) 📝 `crates/client/src/client/async_client.rs` (+2 -2) 📝 `crates/client/src/client/async_secure_client.rs` (+1 -1) 📝 `crates/client/src/h2_client_connection.rs` (+1 -1) 📝 `crates/client/src/lib.rs` (+1 -1) 📝 `crates/client/src/tcp/tcp_client_connection.rs` (+2 -2) 📝 `crates/client/src/udp/udp_client_connection.rs` (+5 -4) 📝 `crates/proto/src/h2/h2_client_stream.rs` (+2 -2) 📝 `crates/proto/src/h3/h3_client_stream.rs` (+2 -2) 📝 `crates/proto/src/lib.rs` (+1 -164) 📝 `crates/proto/src/multicast/mdns_client_stream.rs` (+4 -2) 📝 `crates/proto/src/multicast/mdns_stream.rs` (+4 -3) _...and 49 more files_ </details> ### 📄 Description Looking at the code in #2462 I wasn't very happy with the abstractions so I started pulling on some threads. This resulted in moving the `RuntimeProvider` from the resolver crate to proto, which IMO makes more sense as it doesn't have any dependencies on resolver code. The last commit makes the same change as #2462 but IMO does so in a cleaner way. cc @mokeyish would be happy to get your feedback! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:23:07 +03:00
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#3062
No description provided.