Skip to content

jmontroy90/codecrafters-dns-server-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

progress-banner

This is my Rust solution for the CodeCrafter's "Build Your Own DNS server" Challenge.

tl;dr - this was a real challenge with:

  • Bit-packing the header, bit shifts and all that.
  • Parsing and reading different formats of low-level bytes.
  • Rust is a nitpicky language.
  • The QNAME pointer requires the full packet to resolve, but my initial implementation consumed a BytesMut via like buf.get_u16() a lot, such that pointers couldn't be resolved in line with the rest of the code. Thinking of a way to defer the pointer resolve was tricky, and I don't really think it's an amazing solution. Much better would be to use a Cursor that allows you to move around the buffer as you go. Maybe in the future.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors