Hey HN!<p>Wanted to share a fun experiment - I implemented the full JSONLogic spec in Rust with Github Copilot (Claude) as my coding buddy. The entire implementation took less than 5 hours from start to finish.
Here's how I approached it:<p>- Started with a clear architectural vision - broke down the operators into categories (logical, comparison, numeric, etc.) and explained this structure to Copilot. This helped set a consistent pattern for the implementation.<p>- Used test-driven development by importing JSONLogic's official test suite. Set up the test infrastructure and let all tests fail initially. This gave us clear targets to work towards.<p>- Implemented one operator (like 'var') completely, establishing the code pattern and error handling approach. Copilot quickly picked up on the style and helped extend it.<p>- For each operator category, explained the requirements and let Copilot generate the implementation following our established pattern. The test suite helped catch edge cases we might have missed.<p>- Final polish included running Clippy for Rust best practices, adding proper error messages, and some performance tuning like reducing allocations.<p>What surprised me was how smoothly it went when I gave Copilot clear context and patterns to follow. It's like pair programming with someone who types really fast but needs good direction<p>The library is now production-ready and handles all JSONLogic operations with proper error handling and type safety.<p>Would love to hear others' experiences pairing with AI tools for Rust projects!