News · 2026-09-01
A 65,000-line Go-to-Rust rewrite cost $400 by translating through a data model first
Developer Iurii Krasnoshchok published an account on September 1, 2026 of rewriting rune, his 65,000-line Go terminal editor, into Rust for about $400 using Claude Fable. The method was not file-by-file translation. He had the model extract the program's structure into an intermediate representation -- graphs, state machines, constraints -- transform that representation, and then generate Rust from it. For comparison, the post cites a documented Zig-to-Rust rewrite of Bun that cost $165,000 for 535,496 lines.
Key facts
- About $400 for a 65,000-line Go-to-Rust rewrite, using Claude Fable 5.
- The cited comparison point: a Bun rewrite at 535,496 lines for $165,000 -- roughly eight times the code at roughly 400 times the cost.
- Published September 1, 2026.
- Primary source: Krasnoshchok's post; the Bun rewrite he benchmarked against; the rewritten editor is rune.
The method rests on a claim about where the expensive part of a rewrite actually is. The Bun approach he read about ran a loop over the source: generate a porting guide, mechanically port every file, fix every compiler error, get subcommands working, get the test suite passing, then several large refactor passes. That works, and it burns tokens proportional to the code, repeatedly, because every fix pass re-reads the code.
Krasnoshchok's bet was that a program's essential structure is much smaller than its text. So step one is to ask the model to represent the code as data -- he lists graphs, ontologies, hierarchical state machines, UML process charts, constraints, and mathematical formulae as options. Step two is to operate on that representation: simplify the state machine, cut the number of states, remove hidden communication channels like shared tables or shared memory addresses. Step three is to generate code from the cleaned-up representation, in whatever language you want.
He quotes Fred Brooks as the justification: "Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowcharts; they'll be obvious." The practical version is that translating a 65,000-line program is expensive, and translating the twenty-page description that generates it is not. The analogy is a translator working from a book's outline and character notes rather than sentence by sentence -- you lose fidelity to the original phrasing and gain enormous leverage over the structure, which is the right trade when the target language wants different phrasing anyway. Going from Go to Rust is exactly that situation: Go's approach to memory and concurrency does not map cleanly onto Rust's ownership model, so a faithful line-by-line port produces bad Rust.
His second observation is about which tools an agent should use, and it is more actionable than it looks. He recommends adding instructions to the prompt telling the model to avoid heavy direct use of search and file-editing tools and to delegate that work to cheaper subagents instead -- using exploration subagents for search and smaller models for bulk edits, while reading files directly only to verify critical claims itself. This is a cost-shaping technique rather than a capability one: the expensive model spends its tokens on judgment, and the cheap models spend theirs on volume. It is the same logic behind model routing and cascades, applied inside a single agent session.
Why this matters beyond one developer's editor: the dominant framing of AI-assisted rewrites has been "point the agent at the repository and let it grind." That framing makes cost scale with code size, which is why the Bun number is what it is. Krasnoshchok's framing makes cost scale with structural complexity instead, which is a much smaller number for most programs. If that generalizes, the economics of language migration -- an enormous, permanently deferred category of work at most companies -- change substantially.
The honest caveat is large and the post is short enough that it cannot be papered over. Krasnoshchok does not say whether the resulting Rust passes rune's original Go test suite. He does not say how much manual fixing was needed, what was lost, or whether the rewrite is in production. Those omissions are precisely the load-bearing questions -- a rewrite that compiles is not a rewrite that works, and $400 for code that needs a week of debugging is a different number than $400 for code that ships. The contrast with DoltLite reaching beta on roughly 2,000 agent pull requests is instructive here: DoltLite's claim is credible mainly because a 5.8-million-query compatibility suite stands behind it. This account has the more interesting method and much weaker evidence. It should be read as a technique worth trying, not a result that has been demonstrated.
Key questions
What is the three-step method?
How does $400 compare to other AI-assisted rewrites?
Does the rewritten Rust code pass the original test suite?
Cite this
APA
Ground Truth. (2026, September 1). A 65,000-line Go-to-Rust rewrite cost $400 by translating through a data model first. Ground Truth. https://groundtruth.day/news/a-65000-line-rust-rewrite-cost-400-dollars.html
BibTeX
@misc{groundtruth:a-65000-line-rust-rewrite-cost-400-dollars,
title = {A 65,000-line Go-to-Rust rewrite cost $400 by translating through a data model first},
author = {{Ground Truth}},
year = {2026},
month = {sep},
url = {https://groundtruth.day/news/a-65000-line-rust-rewrite-cost-400-dollars.html}
}
Comments are replies to this story on Bluesky — reply with any Bluesky account to join in.