Разработчик написал компилятор Svelte на Rust с ИИ-агентом за 106 вечеров и $700
Разработчик устал от медленных инструментов Svelte — сборки, дев-сервера и LSP — и решил написать собственный компилятор на Rust. Первая попытка: 5,5 месяца работы вручную, после чего проект был заброшен. Год спустя вернулся с ИИ-агентом. Итог: 106 вечеров и $700 на API — компилятор готов. История о том, как AI-помощник помог завершить задачу, которая оказалась не по силам в одиночку.
AI-processed from Habr AI; edited by Hamidun News
A developer from Habr completed a Svelte compiler written in Rust with the help of an AI agent — after having abandoned the same task a year earlier when working alone. The second attempt took 106 evenings and $700 in API costs, while the first lasted 5.5 months with no result.
Why Rewrite the Svelte Compiler in Rust
The official Svelte compiler is written in JavaScript and TypeScript — at scale, this becomes a bottleneck. According to the author of the Habr post, everything in their team was slow: the build process, the dev server, type checking via svelte-check, and the LSP language server.
Rust — a system-level language with performance comparable to C++ — could improve the speed of the entire development cycle several times over. Svelte is popular precisely for its client-side speed: it compiles templates into optimized JavaScript at build time, bypassing the virtual DOM. Rewriting the compiler in Rust means achieving the same speed on the development side as well.
Key project parameters:
- Problem: slow build, dev-server, svelte-check, and LSP
- Solution: write an alternative compiler in Rust
- First attempt: 5.5 months of solo work — abandoned
- Second attempt: 106 evenings with an AI agent, result — $700 in API costs
Why a Compiler Is Hard to Write Alone
Compiler development is one of the most labor-intensive tasks in programming. It requires lexical analysis, building an abstract syntax tree (AST), semantic analysis, code generation, and compatibility with the plugin ecosystem. Even for a relatively small framework, this amounts to hundreds of hours of work.
Over 5.5 months, the developer made steady progress alone, until the work stalled. Projects like this require continuous context retention: parser state, grammar edge cases, dozens of interconnected components. Any extended pause — and restoring the working context itself becomes a task that takes weeks.
The project was abandoned. A year passed.
How the AI Agent Changed the Outcome
Returning to the project, the developer connected an AI agent. The compiler was completed in 106 evenings at a total cost of $700 in API requests.
"I spent five and a half months hacking at it by hand and gave up.
A year later I came back with an AI agent and finished it in 106 evenings and $700," the author writes in the Habr post.
The average cost per evening was around $6.6, comparable to the price of a coffee. The AI agent took on precisely the part of the work that is most exhausting in manual development: boilerplate code, debugging loops, refactoring repetitive patterns. The developer remained the project's architect and made all key decisions.
In the end, $700 in investment turned into a real infrastructure tool for the entire team — a compiler that speeds up exactly the tools that had been slowing everything down from the start.
What This Means
The story illustrates a new practical role for AI agents in software development: not as a replacement for the programmer, but as a tool for overcoming the "valley of death" of complex projects — that stage of heavy routine work where most personal projects stop forever. The Svelte compiler in Rust, which proved impossible to build alone, became a real working tool with an investment of $700.
Frequently Asked Questions
How much did it cost to write the
Svelte compiler with an AI agent?
According to the author, the total API costs amounted to $700 over 106 evenings of work — about $6.6 per working session.
Why use Rust for the Svelte compiler?
Rust is a system-level language with C++-level performance. Rewriting the compiler from JavaScript/TypeScript to Rust means fundamentally faster build speeds, LSP, and svelte-check — exactly the tools that were slowing down the team's workflow.
Need AI working inside your business — not just in your newsfeed?
I build production AI for companies — custom CRM, internal tools, autonomous agents, workflow automation. Owned by you, shaped to your process, no per-seat tax. Built by Zhemal Khamidun, CPO of AlpinaGPT (AI platform, 6,000+ users).
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.