Async tokio runtime with modular architecture #1
Reference in New Issue
Block a user
Delete Branch "feat/async-tokio"
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?
Summary
std::net::UdpSocketwithtokioasync runtime — each incoming DNS query is handled concurrently viatokio::spawnmain.rsinto 9 focused modules: buffer, header, question, record, packet, config, cache, forward, statsServerCtxstruct behindArc, with scopedstd::sync::Mutexlocks (sub-microsecond holds, never across.await)dns_fun.toml), TTL-aware response cache with lazy eviction, structured per-query logging, and periodic stats summariesrt-multi-thread,macros,net,time(nofull)cargo fmt --checkandcargo clippy -- -D warnings; fix all clippy warningsCLAUDE.mdTest plan
make allpasses (fmt + clippy + build)sudo cargo runstarts and binds to port 53dig @127.0.0.1 google.comreturns valid response (FORWARD path)[[zones]]entry todns_fun.toml, query it — returns LOCAL pathfor i in $(seq 1 10); do dig @127.0.0.1 example.com & done🤖 Generated with Claude Code