AST-grep Rewrote Tree-sitter in Rust: 30% Faster Code Analysis for AI Tools

AST-grep Rewrote Tree-sitter in Rust: 30% Faster Code Analysis for AI Tools

What Is the AST-grep Tree-sitter Rust Rewrite? AST-grep, the popular structural code search tool with over 15,000 GitHub stars, rewrote Tree-sitter’s C parsing core entirely in Rust using ChatGPT-assisted code generation. The result is a 29.74% improvement in raw parsing throughput and a 22.2% faster end-to-end code analysis pipeline, making it significantly faster for AI coding agents and developer tools that rely on syntax-tree-based code understanding. Why Did AST-grep Rewrite Tree-sitter in Rust? Tree-sitter has been the gold standard for incremental parsing in code editors since its release. Its C core is battle-tested and powers syntax highlighting in editors like Neovim, VS Code, and Zed. But AST-grep’s use case is fundamentally different from an editor’s. ...

July 28, 2026 · 10 min · baeseokjae