Developer and open source · September 12, 2026
Show HN: Rust-split, save your tokens on large Rust source files
Reported by Hacker News
In short
Rust-split is an open source tool that uses Rust's syn AST parser to break large "God" Rust source files into smaller, well-bounded modules, helping AI coding agents work more efficiently. It runs two passes: one to losslessly extract top-level items and one to write a module layout under a configurable line-count ceiling, leaving only import fixes for the LLM to handle.
Why it matters
Smaller, well-scoped files mean fewer wasted tokens and fewer cascading failures when AI agents edit Rust codebases, making this a practical fix for a common agentic coding pain point.
Terms used in this story
Read the original reporting
Hacker News (opens in a new tab)AI Download summarizes and links to the news. We do not republish full articles.