Rewriting 65k Lines of Go in Rust with Fable Cost Just $400

I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

Rewriting 65k Lines of Go in Rust with Fable Cost Just $400

A developer used Fable 5, an LLM-powered tool, to rewrite 65,000 lines of Go into Rust for only $400. The key insight: by representing code as data structures like graphs and state machines, the LLM could autonomously perform the complex refactoring. The process involved three steps: representing the code, operating on that representation, and generating new code. The author also shares tips for using Fable effectively, such as avoiding extensive file searches and delegating to subagents.

If you can rephrase your problem as a data problem, it can autonomously do complex refactorings, rewrite from one language to another, extract or merge services — in other words, make fundamental changes.
  1. drzaiusx11

    I recently performed this exact exercise of converting a complex library set from one language into an intermediate state machine representation and then translated into N other languages. It worked well but there's a lot of caveats. I'd highly recommend a direct "port" in most cases tbh, as many bugs are "load bearing" and may not survive the intermediate translation. I speak from experience.

  2. aka-rider

    Following the recent "Rewriting bun in Rust" I thought to run an experiment which turned out to be success.

  3. vessenes

    The title is the worst part of the essay. Which is super interesting, to wit: fable's a very capable model when it comes to transforming concepts in and out of structural descriptions, and you can use it (along with a test suite I presume) to transpile a codebase. I wouldn't have thought to do this, but I think it makes sense, and I like it - it's using model intelligence at a few different steps for sensible things. Thanks for the writeup. De clickbait your title though or you'll keep getting clickbait rage responses :)

  4. motbus3

    Makes sense it would have been 6 USD in GLM 5.3?

  5. ramon156

    what did i read? genuinely? its only a few words, and even that had to be AI written. The topic in the title barely was mentioned.

More from this day

2026-09-01