mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #490] Add (optional) serde support for types in trust_dns_resolver::config #205
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kingoflolz on GitHub (May 25, 2018).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/490
Hi,
I am building an application which will use trust-dns-resolver and I would like to have a config file where the user can specify which DNS server to use. Adding serde as an optional dependency and optionally deriving Serialize and Deserialize on the config types would make this much easier. Is this something that you would be interested in adding?
I would be happy to provide a PR for this.
Thanks
@bluejekyll commented on GitHub (May 25, 2018):
I'd prefer to not pull a dependency on Serde right now, to be clear, we are trying to keep the number of dependencies in the Resolver limited so that it fits with various use cases where there is a desire to have a small set of dependencies, in fact there are probably many that we should be considering for removal.
It's possible this might work: https://serde.rs/remote-derive.html
Something along the lines of:
See how far that gets you... If that's successful, we could add another crate for Serde derived configurations to help people in similar situations.
@kingoflolz commented on GitHub (May 26, 2018):
@bluejekyll using remote derive should work, but I think it will be better to build serde support in so it would be more seamless. We can use a cargo feature to ensure there are no additional deps by default, and people who need it can opt into using serde.
@bluejekyll commented on GitHub (May 26, 2018):
@briansmith, I think you’d have the biggest concern here...
@briansmith commented on GitHub (May 26, 2018):
I don't have a good answer. If this were my project I would probably wouldn't do it, just due to lack of time to fully think through all the implications of doing it.
@bluejekyll commented on GitHub (May 26, 2018):
Thanks, @briansmith.
@kingoflolz there is this issue: #483, which may be of interest. I think that might end up needing some serde derivable configs as well. I did add this to the server crate. My concern is that with the resolver we want to keep the dependencies slim as we want it to be able to be embedded in many different contexts, and config files would generally only be for binaries.
I suppose if we keep this as optional, and off by default, then that would be ok, though I am curious what it would look like to have a separate crate for this glue...
@kingoflolz commented on GitHub (May 27, 2018):
@bluejekyll Thanks for your reply, I'll create a PR adding it as an optional feature to structs in trust-dns-resolver::conf::* (at least for now), and I'll make it off by default.
P.S. Serde provides external derives which alleviate most of the issue, however, they are less ergonomic to use (have to specify a #[serde(with = "")] every time its (de)/serialized)
Signer/Verifier,KeyPair/PublicKey, etc. #389