Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Theo Ported TypeScript to Rust with AI and Never Read the Code

说明与用途

使用大型语言模型将 TypeScript 编译器迁移到 Rust,最初耗费 42 万美元的 API 令牌,随后切换模型后仅花 2.4 万美元完成完整兼容,速度比原版快 13 倍,但 Bun 的检查器更快。

问题

Can a large compiler be ported by AI without human code review, and what are the cost and performance implications?

结果

An LLM‑generated Rust port of TypeScript achieved full compatibility for $24k, delivering a 13× speedup over the original compiler, but was outperformed by Bun’s checker. The high initial cost ($420k) and lack of code review highlight risks of agent‑written code.

工作流

  • 1. Theo used OpenAI models over five months, generating 1.3M lines of Rust code and spending ~$420k in tokens.
  • 2. The generated code reached ~84% compatibility but was deemed unusable.
  • 3. Theo switched to the Opus model, which produced a working Rust crate in 10 hours for ~$24k.
  • 4. The new tsc-rs implementation was benchmarked against tsc 6, tsc 7, and bun check.
  • 5. Theo published performance results and a warning that he had not read the code.
  • 6. The community compared tsc-rs to bun check and tsc 7, noting trade‑offs in speed and diagnostics.

证据

The port cost over $420,000 in API tokens. Then he says you could probably have done it for $20k.

来源

On VS Code, a full type check runs in 4.20s against tsc 6's 54.56s. That is a 13x speedup.

来源

He spent about $400,000 in tokens over five months using OpenAI models, burning through /goal loops. They wrote over 1.3 million lines of Rust and never got past roughly 84% compatibility.

来源

The final spend was about $24,000 over two weeks.

来源

On VS Code, bun check runs a full check in 1.62s. That is 33.7x faster than tsc 6, on a 3.75 million line codebase.

来源

  • 记录日期: 2026-10-07T15:55:50.902Z