HeadlinesBriefing favicon HeadlinesBriefing.com

Building a Simple Tool in Rust: Lessons Learned

DEV Community •
×

A weekend project turned into a four-weekend journey, transforming a small CLI tool into a complex learning experience. The creator of Axotly, a lightweight CLI tool for testing APIs, initially underestimated the complexity of building a simple developer tool. The project began with a vision for a straightforward CLI to test APIs, akin to Postman but CLI-first. However, the need to write tests and parse a new DSL revealed the hidden challenges of maintaining a simple tool.

The real struggle began with building a parser from scratch. Despite initial success, the creator realized the code was neither maintainable nor scalable. Tracking changes in the input format became increasingly difficult, leading to a rethinking of the architecture. This experience underscored the complexity of creating a simple tool, especially in Rust. The discovery of grammar-based parsing with .pest changed the perspective on structure and maintainability, offering a safer approach to updates.

Throughout the project, the creator experimented with AI coding agents, including Gemini CLI, OpenCode, and Claude Code. While these tools were sometimes impressive, generating working code and exploring alternatives, they also had drawbacks. Adjusting prompts often required more time than writing the code manually. This led to a deeper understanding of when to leverage AI and when to rely on traditional coding methods. The project ultimately became Axotly, a testament to the lessons learned in building a simple, maintainable tool.

The series promises to delve into the intricacies of learning parsers, the benefits of using .pest, the role of AI coding agents, and the importance of designing small tools that remain simple over time. For developers who have encountered similar challenges, this series offers valuable insights and practical lessons.