DHH Oversees Lightning-Fast AI Rewrite: Python to Rust in 3 Hours, Redefining Coding Future

August 16, 2026
DHH Oversees Lightning-Fast AI Rewrite: Python to Rust in 3 Hours, Redefining Coding Future
  • The core of the story centers on DHH overseeing a rapid AI-assisted rewrite: the Python library TerminalTextEffects was transformed into Rust in just over three hours, yielding 21,000 lines of Rust and a 3MB executable, at a token cost of about 11 million.

  • Eight agents worked in parallel on multiple branches with iterative merging, testing, and failure handling, delivering the result in what was described as a near one-shot process.

  • Looking ahead, experts say the marginal cost of code generation is shrinking toward zero, shifting programmer focus from writing code to defining requirements, enforcing constraints, testing, and validating AI-generated outputs.

  • The same AI-assisted refactoring approach scaled to Bun’s codebase, migrating about a million lines from Zig to Rust in under two weeks, underscoring scalable AI-driven program evolution.

  • As with tech coverage, the piece includes standard financial disclosures about potential third-party sourcing and investment risk from KuCoin.

  • Different AI models yielded results: Claude Code delivered faster results with no manual intervention, while Codex also showed strong output but was slower and costlier.

  • TerminalTextEffects, or TTE, is a terminal visual effects engine that can run as a CLI or be used as a Python library to control text movement, colors, gradients, and animations.

  • Historically, DHH argued coding should remain human-driven, even flirting with retirement if AI fully took over, but by 2024–25 he pivoted to AI-assisted coding as a primary workflow.

  • His stance evolved from advocating human-written code to an agent-first approach, suggesting that within about five years many people may not be hand-writing or reading code.

  • The Rust rewrite dramatically improved performance: startup time dropped from 87 ms to 2 ms, and rendering speed increased roughly tenfold, delivering substantially faster results.

  • The new ttfx repository lives under DHH’s Omarchy organization, preserving all commits and illustrating how a Python tool can be effectively converted to Rust with nearly identical size and functionality.

Summary based on 1 source


Get a daily email with more AI stories

More Stories