An engineer describes evolving a Rails CRUD app for dance competition scheduling into a system that must also run offline in judges' browsers and phones. That offline requirement pushed the author to transpile ERB views and minimal business logic into client-side code, which forced serious type inference - tracing instance variables back to controllers and models to distinguish arrays from hashes. That work led to Roundhouse and Spinel: a transpilation toolchain that can emit CRuby, Spinel, Rust, and even Kotlin/Swift, letting a three‑tier Rails app run in the browser with sourcemaps, breakpoints, and watch-mode tests. Demos and downloads show Rails features preserved (TailwindCSS, TurboStreams, Action Cable), and deployments can target Vercel+Neon or Cloudflare Durable Objects without rewriting. Making outputs monomorphic improved performance; emitting Rust as a target sped both Spinel and CRuby.
The core argument is that switching languages - Rust included - is a red herring when the real problem is long‑term maintenance and unexpected requirements. One‑shot rewrites optimize initial authoring but fail to solve security and evolving needs. The practical solution offered is a rock‑solid contract layer or DSL with explicit escape hatches and a compiler that captures intent rather than mechanism, enabling safe, optimizable multi‑target outputs without repeated full rewrites.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.