---
id: 12861
lang: en
title: "Developer Writes a Svelte Compiler in Rust With an AI Agent in 106 Evenings and $700"
published_at: "2026-08-03 07:24:00"
source_name: "Habr AI"
source_url: "https://habr.com/ru/articles/1065708/?utm_campaign=1065708&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/12861"
categories: ["autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Developer Writes a Svelte Compiler in Rust With an AI Agent in 106 Evenings and $700

> **Краткая суть (BLUF):** A developer grew tired of slow Svelte tooling — builds, the dev server and the LSP — and decided to write his own compiler in Rust. His first attempt took 5.5 months of manual work, after which he abandoned the project. A year later he came back with an AI agent. The result: 106 evenings and $700 in API costs, and a finished compiler.  It is a story about how an AI assistant helped complete a task that proved too much to handle alone.

A developer on Habr has finished building a Svelte compiler in Rust with the help of an AI agent, a year after abandoning the same task while working alone. The second attempt took 106 evenings and $700 in API costs, while the first took 5.5 months and produced no result.

## Why rewrite the Svelte compiler in Rust

The official Svelte compiler is written in JavaScript and TypeScript, which becomes a bottleneck as a project scales. According to the author of the Habr post, everything slowed down on his team: the build, the dev server, type checking via svelte-check and the LSP language server.

Rust is a systems language with performance comparable to C++, and it could speed up the entire development loop several times over. Svelte is popular precisely for its speed on the client: it compiles templates into optimized JavaScript at build time, bypassing the virtual DOM. Rewriting the compiler in Rust means getting the same speed on the development side too.

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, $700 in API costs

## Why a compiler is hard to write alone

Writing a compiler 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, that means hundreds of hours of work.

For 5.5 months the developer made progress on his own, until the work stalled. Projects like this demand holding a great deal of context in your head at once: parser state, grammar edge cases, dozens of interdependent components. After any long pause, rebuilding that working context becomes a weeks-long task in itself.

The project was abandoned. A year went by.

## How the AI agent changed the outcome

When he returned to the project, the developer brought in an AI agent. The compiler was finished in 106 evenings at a total cost of $700 in API requests.

> "I poked at it by hand for five and a half months 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 his Habr post.

That averages about $6.6 per evening, comparable to the price of a coffee. The AI agent took over exactly the kind of work that wears people out most in manual development: boilerplate code, debugging cycles and refactoring of repetitive patterns. The developer remained the project's architect and made the key decisions.

In the end, the $700 investment turned into a real piece of infrastructure for the whole team: a compiler that speeds up the very tools that had been getting in the way from the start.

## What this means

The story shows a new practical role for AI agents in development: not a replacement for the programmer, but a tool for getting through the "valley of death" of complex projects — that stage of voluminous routine work where most personal projects stall for good. A Svelte compiler in Rust that proved too much to tackle alone became a working tool for an investment of $700.

## Frequently asked questions

### How much did it cost to write a Svelte compiler with an AI agent?

According to the author, total API spending came to $700 over 106 evenings of work, about $6.6 per work session.

### Why use Rust for a Svelte compiler?

Rust is a systems language with C++-level performance. Rewriting the compiler from JavaScript/TypeScript to Rust means substantially faster builds, LSP and svelte-check — precisely the tools that slowed down the team's workflow.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/articles/1065708/?utm_campaign=1065708&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/12861
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
