We'll build a fully functional command-line calculator from the ground up in Rust. Starting with a minimal REPL, we progressively add a tokenizer that splits expressions into meaningful tokens, implement the Shunting Yard algorithm to convert infix notation into Reverse Polish Notation, and assemble a stack-based evaluator that computes the final result.
Along the way we'll practice idiomatic Rust patterns: custom error types with Display, the Result/? pipeline, newtype wrappers, trait implementations (FromStr, Add, Sub, Mul, Div), and test-driven development. By the end, our calculator handles parenthesized expressions with correct operator precedence, decimal numbers, and clear error messages for invalid input.