We'll build a complete URL shortening service from scratch using Rust and the axum web framework. Starting with a bare Cargo project, we'll progressively add async runtime support, HTTP routing, CLI configuration, request handlers, shared state management, and a domain-specific code type with base62 encoding.
Along the way we'll see how axum's extractor system works, how to share mutable state safely across async handlers using Arc<RwLock<T>>, and how to implement custom Serde serialization for domain types. By the end, our service accepts URLs via a POST endpoint, generates compact short codes, stores mappings in memory, and redirects visitors back to the original destination.