Mazda CX5
Хочете будувати кар’єру в Data Science та AI? Vodafone Big Data Lab відкриває новий набір —>

AI experiment for $24,000. YouTuber rewrote TypeScript compiler in Rust, outperforming Microsoft's version in speed

Popular developer and YouTuber Theo Browne used autonomous AI agents to fully port Microsoft's TypeScript compiler to Rust. The resulting project, TS_Rust, passed nearly 100% compatibility tests and was twice as fast as Microsoft's official Go rewrite.

Leave a comment
AI experiment for $24,000. YouTuber rewrote TypeScript compiler in Rust, outperforming Microsoft's version in speed

Popular developer and YouTuber Theo Browne used autonomous AI agents to fully port Microsoft's TypeScript compiler to Rust. The resulting project, TS_Rust, passed nearly 100% compatibility tests and was twice as fast as Microsoft's official Go rewrite.

The experiment, which the author initially launched as an "unfeasible project to burn excess tokens," not only turned out to be successful, but may also pave the way for significantly cheaper and easier infrastructure for AI agents, The Register reports .

The path from $400,000 on GPT to a breakthrough with Claude 5.5

Brown initially tried to assign the task to OpenAI models (GPT-5.6 Sol and GPT-6 Astra). After spending the equivalent of over $400,000 in tokens, the AI ​​only managed to achieve 84% compatibility, after which the models got stuck and were unable to complete the task.

However, with the release of Anthropic's Claude Opus 5.5 model, the developer decided to try again. The new model produced a fully working implementation, spending about $24,000 in API tokens within Brown's subscription. The resulting compiler, type checker, and language server successfully passed the official TypeScript conformance tests.

Interestingly, the AI ​​agent discovered a trick on its own: instead of a direct and complex translation from the original JavaScript to Rust, Claude took the official new version of TypeScript (v7) from Microsoft, written in Go, as a basis and translated it to Rust (even copying a few original bugs along the way).

“Writing all of TypeScript from JS to Rust directly would be unviable. The Microsoft team went through every line of code, ported it to Go, and then optimized it. My AI agents did the same thing, but from the Go version to Rust,” Brown explained.

2x faster than Go and 12.5x faster than JS

The performance results surprised the developer himself, who admitted that he didn't even inspect the generated code personally:

  • TS_Rust runs twice as fast as the official Go version of TypeScript (v7) that Microsoft released earlier this year;

  • 12.5 times faster than previous classic versions of TypeScript (v6) on JavaScript.

Why this is important for the future of AI agents

In addition to the fact of achievement itself, the project solves an important practical problem. As the cost of computing models drops exponentially, the most expensive part of running AI agents is the infrastructure of their working environments (virtual machines and Docker containers, which consume a lot of memory).

Because Rust does not require a garbage collector, the TS_Rust compiler can be efficiently compiled to WebAssembly and run directly inside Google's V8 engine (as Cloudflare does, for example).

The Go version didn't allow this to be done easily, as it required packaging a heavy Go runtime. Using TS_Rust together with lightweight environments (like Just Bash from Vercel) will save hundreds of megabytes of memory per agent, eliminating the need for heavy virtual machines.

New trend: AI rewrites the world's code in Rust

TS_Rust is just one in a series of similar experiments. Microsoft itself recently used AI to rewrite the Copilot runtime in Rust (spending about $120,000 in tokens). Google, using the Gemini 4 Argon model, is also actively using AI agents to port large C/C++ code bases (RE2, libgav1, and parts of the Zircon kernel in Fuchsia OS) to Rust.

“Such YOLO projects shouldn’t even work. They shouldn’t even be tested, let alone become a full-fledged replacement for TypeScript,” Theo Brown concluded, expressing optimism about the future of AI-powered software development.

Google unveils Gemini 4 Argon. The model can issue up to 1 million tokens and port large codebases from C++ to Rust
Google unveils Gemini 4 Argon. The model can issue up to 1 million tokens and port large codebases from C++ to Rust
On the topic
Google unveils Gemini 4 Argon. The model can issue up to 1 million tokens and port large codebases from C++ to Rust
Claude Opus 4.6 from Anthropic spent $20,000 trying to write a C compiler
Claude Opus 4.6 from Anthropic spent $20,000 trying to write a C compiler
On the topic
Claude Opus 4.6 from Anthropic spent $20,000 trying to write a C compiler
Read the country's main IT news in our Telegram
Read the country's main IT news in our Telegram
On the topic
Read the country's main IT news in our Telegram
Also Read
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Нейронні мережі для генерації зображень бачать світ по-своєму, їхню логіку зрозуміти часом зовсім неможливо. Але таки хочеться. На честь Дня Незалежності України редакція dev.ua вирішила провести невеликий експеримент. Ми задали чотирьом різним нейронним мережам п’ять однакових запитів: «прапор України», «День Незалежності України», «український Крим», «перемога України» та «українці». Отриманими результатами ми ділимося з вами нижче.
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok з’явилася нова функція «Розумний фон». З її допомогою як фон для тіктоків можна підставляти згенеровані нейромережею зображення. Редакція dev.ua протестувала цю технологію і ділиться своїми враженнями.
1 comment
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака

Have important news to share? Message our Telegram bot

Key events and useful links in our Telegram channel

Discussion
No comments yet.