HeadlinesBriefing favicon HeadlinesBriefing.com

LLM converts Rust web app to Ruby on Rails in minutes

Hacker News •
×

A solo developer rewrote a 30‑kilo‑line Rust service as a Ruby on Rails app using a local Qwen 3.6 model. The original codebase combined Axum, Tera, Diesel and Playwright‑driven end‑to‑end tests, totaling 14,943 Rust lines and ten seconds of compile time. He ran the model on his RTX 4090 Ti from a pre‑AI gaming rig today.

The author fed the LLM a comparative matrix that scored Rust/Axum/Diesel against plain Rails and Rails + Sorbet across suitability, speed, safety and testability. Rails alone led in development speed (90 vs 40) and unit‑testability (90 vs 20), while Rust retained a performance edge (95 vs 50). Adding Sorbet narrowed the gap, yielding a 1.47× overall advantage for Rails.

The conversion shrank the codebase to 3,322 Ruby lines, a 77 % reduction, resulting in roughly 4.5 Rust lines per Ruby line. The author notes Ruby’s terse syntax, built‑in batteries, and Sorbet’s optional typing could offset Rust’s safety advantages while simplifying testing. He plans to benchmark runtime performance against the original binary.