1. 14

  2. 33

    The dependencies are: …

    • trust-dns-server, a library that implements a DNS server,


    1. 4

      Maybe I should have phrased the title more clear? It’s not about writing one from scratch.

      Edit: I’ve changed the title to Writing a DNS Server in Rust using Trust DNS to be more clear, thanks for the feedback :)

      1. 6

        For what it’s worth, seeing Trust DNS as a dependency through me off a little at first too, but once I got in to the content I understood a bit better your goal - you’re writing custom resolver behavior. I think when I read the title “Writing a DNS Server” I assumed it would be focused on the DNS network/wire protocol itself. What you did is interesting in its own right! Using a dependency for the actual protocol server implementation makes perfect sense in this case. It just wasn’t what I expected based on the original title. I enjoyed the article.

        1. 2

          Yeah, as I mentioned — that’s on me, I didn’t put much thought into the title. Was more trying to show how you can build something “real-world” in Rust, using off-the-shelf dependencies and making them “do the thing”. But valid feedback, nevertheless. Might make another post some weekend on how to actually build a “proper” tiny DNS server in Rust. Thanks for reading it :)

          1. 2

            Just wanted to offer some context since you didn’t get any from that first comment. You did great work here.

    2. 2

      And this weekend I motivated myself into implementing a small DNS serializer/deserializer in Rust, what are the odds :’). (My goal being learning the language while still doing something “low level”).