[PR #3399] [MERGED] bin: clean up the server API #3811

Closed
opened 2026-03-16 12:04:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3399
Author: @djc
Created: 12/13/2025
Status: Merged
Merged: 12/16/2025
Merged by: @djc

Base: mainHead: server-api


📝 Commits (10+)

  • 1903267 bin: create config module
  • bfc0701 bin: move async_run() into library
  • 04012ba bin: move parse_nsid_payload() down
  • da08931 bin: destruct Cli to simplify code
  • ab43d42 bin: move async_run() to Cli::run()
  • 531a5ca bin: move statics down
  • 38db118 bin: convert statics to consts
  • 6351157 bin: move config.rs to config/mod.rs
  • 4cdabc5 bin: move configuration tests into separate file
  • 99dfb76 bin: move config tests into config module

📊 Changes

12 files changed (+1666 additions, -1753 deletions)

View changed files

📝 bin/Cargo.toml (+0 -3)
bin/src/config/mod.rs (+667 -0)
📝 bin/src/config/tests.rs (+129 -56)
📝 bin/src/hickory-dns.rs (+5 -896)
📝 bin/src/lib.rs (+828 -745)
📝 bin/src/prometheus_server.rs (+3 -3)
📝 bin/tests/integration/main.rs (+0 -1)
📝 crates/server/src/access.rs (+12 -12)
📝 crates/server/src/server/mod.rs (+8 -12)
📝 crates/server/src/server/quic_handler.rs (+2 -13)
📝 crates/server/src/store/blocklist.rs (+10 -10)
📝 justfile (+2 -2)

📄 Description

This found some unused options, and sets us up to make those easier to find. Also drops the duplication of a getter for each Config field and offers a complete library for bringing up servers which in turn might make testing easier.


🔄 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/3399 **Author:** [@djc](https://github.com/djc) **Created:** 12/13/2025 **Status:** ✅ Merged **Merged:** 12/16/2025 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `server-api` --- ### 📝 Commits (10+) - [`1903267`](https://github.com/hickory-dns/hickory-dns/commit/190326766953dd3b852fb73c0b0ac129f3a80fbf) bin: create config module - [`bfc0701`](https://github.com/hickory-dns/hickory-dns/commit/bfc0701257615227ca77415502ab2811d0301e62) bin: move async_run() into library - [`04012ba`](https://github.com/hickory-dns/hickory-dns/commit/04012ba948c10660b33e97b656763d8944d88c1e) bin: move parse_nsid_payload() down - [`da08931`](https://github.com/hickory-dns/hickory-dns/commit/da08931c1b6d56e2bd103b48c7b382c72ed5eea3) bin: destruct Cli to simplify code - [`ab43d42`](https://github.com/hickory-dns/hickory-dns/commit/ab43d4247994a384e35f486d6b22cbc8d9d1cf8d) bin: move async_run() to Cli::run() - [`531a5ca`](https://github.com/hickory-dns/hickory-dns/commit/531a5ca0bf9fa74af0b44022d0a189966f0bc15d) bin: move statics down - [`38db118`](https://github.com/hickory-dns/hickory-dns/commit/38db11883cf15590b110720b96a6c194587c6d2f) bin: convert statics to consts - [`6351157`](https://github.com/hickory-dns/hickory-dns/commit/6351157af16e3302ddc00ce169aa4b1534c3d67f) bin: move config.rs to config/mod.rs - [`4cdabc5`](https://github.com/hickory-dns/hickory-dns/commit/4cdabc5e3cc9dc3a622017ca26c25fd5e8d51e1e) bin: move configuration tests into separate file - [`99dfb76`](https://github.com/hickory-dns/hickory-dns/commit/99dfb761445d53959330d3189d85118ff3134a3d) bin: move config tests into config module ### 📊 Changes **12 files changed** (+1666 additions, -1753 deletions) <details> <summary>View changed files</summary> 📝 `bin/Cargo.toml` (+0 -3) ➕ `bin/src/config/mod.rs` (+667 -0) 📝 `bin/src/config/tests.rs` (+129 -56) 📝 `bin/src/hickory-dns.rs` (+5 -896) 📝 `bin/src/lib.rs` (+828 -745) 📝 `bin/src/prometheus_server.rs` (+3 -3) 📝 `bin/tests/integration/main.rs` (+0 -1) 📝 `crates/server/src/access.rs` (+12 -12) 📝 `crates/server/src/server/mod.rs` (+8 -12) 📝 `crates/server/src/server/quic_handler.rs` (+2 -13) 📝 `crates/server/src/store/blocklist.rs` (+10 -10) 📝 `justfile` (+2 -2) </details> ### 📄 Description This found some unused options, and sets us up to make those easier to find. Also drops the duplication of a getter for each `Config` field and offers a complete library for bringing up servers which in turn might make testing easier. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 12:04:02 +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#3811
No description provided.