Port of the TypeScript compiler, checker and lsp to Rust, by LLM
TL;DR Highlight
LLMs ported tsc to Rust; Opus 5.5 got furthest in two weeks for about $24k
Who Should Read
Backend or tooling developer weighing cost and quality of letting coding agents do a large port or rewrite
Core Mechanics
- OpenAI models spent $400k and stalled near 84%
- GPT-5.6 Sol and GPT 6 Astra used over $400,000 of API-priced tokens.
- Months of /goal loops produced over 1.3M lines of Rust but never got past roughly 84% compatibility.
- Opus 5.5 restarted from scratch and went further
- It had a working v0 in 10 hours.
- The author expected it to reuse the Codex code, but it started over.
- It got further than Astra in 1/10th the time.
- Two weeks cost about $24,047
- That is API-priced spend, though the author used Claude accounts.
- It equaled 925% to 983% of his $200 plan's weekly limits.
- It is a direct port of the Go tsc 7
- It keeps the algorithms and behavior of Microsoft's native Go TypeScript compiler.
- It offers the same CLI (tsc), language server, and API, and all 184,773 ported Go tests pass.
Community Reactions
- Skepticism about adoption value
- One commenter asked why use a less maintained, less tested implementation.
- Another said the real question is what this teaches us.
- Real-world speedup is small in absolute terms
- A commenter noted real-world project times were only 1-3s better than tsc 7.
- They said percentages can look more impressive than absolutes.
- Rust port reimplements Go semantics, hurting performance
- A commenter said it reimplements Go-style strings and much of the Go standard library.
- They argued it jumps through hoops to preserve Go behavior.
- Concerns about verification and maintenance
- A commenter worried about holes where original authors thought tests unnecessary.
- Another recalled Bun's rewrite taking 3 months of human labor to fix issues before release.
- A TypeScript team member said they were surprised 3 such ports appeared in a week.
How to Apply
- Measure test pass rate first
- Run an agent loop that raises the pass rate against the existing test suite of a library you want to port.
- Record the pass rate numerically to compare models.
- Compare models on a small module
- Give the same small port to two models and record time and token cost.
- Also try a new model starting from scratch instead of inheriting stuck code.
- Verify the port with output diffs
- Write a script that feeds the same inputs to original and port and compares outputs across several projects.
- Document mismatches as a known-problems list.
- Adopt a marker for LLM-written code
- Mark LLM-written sections in the README like the "Slop Line".
- State the verification scope so users can judge the risk.
Try It
# Paste into Claude Code (simplified version of the article's method: test pass-rate goal loop)
Goal: port module {{module name}} in {{original library path}} to {{target language}}.
Rules:
- Keep the original algorithms and behavior.
- Port the original tests and run them with {{test command}}.
- Print passed/total tests at each iteration.
- Stop at 100% or if the rate does not improve for 3 iterations in a row, and summarize what blocked you.
Show me the port plan and file structure first, and start after I approve.
Next to try: when done, have it feed 20 identical inputs to the original and the port and list the outputs that differ.Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.