Async tokio runtime with modular architecture #1

Merged
razvandimescu merged 4 commits from feat/async-tokio into main 2026-03-10 11:35:26 +08:00

4 Commits

Author SHA1 Message Date
Razvan Dimescu
f627b03e80 gitignore docs/ directory
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 05:18:59 +02:00
Razvan Dimescu
2c6133344a add Makefile with clippy/rustfmt linting, fix all warnings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 05:04:31 +02:00
Razvan Dimescu
967150b991 gitignore CLAUDE.md and update README for async tokio
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 04:58:11 +02:00
Razvan Dimescu
7327a96e82 refactor to async tokio with modular architecture
- Replace synchronous std::net::UdpSocket with tokio async runtime
- Spawn concurrent task per incoming DNS query via tokio::spawn
- Extract monolithic main.rs into modules: buffer, header, question,
  record, packet, config, cache, forward, stats
- Share state across tasks via Arc<ServerCtx> with scoped Mutex locks
- Add TOML config loading, TTL-aware cache, structured logging, stats
- Add CLAUDE.md, README, dns_fun.toml config, and design docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 04:50:16 +02:00