Why bother

Success shouldn’t mean a rewrite.

Rails gets a small team to a working product fast, and CRuby on Puma serves it well for years. Then success brings constraints nobody planned for: a cloud bill that grows with every worker, users far from your region, places CRuby can’t run at all. The usual answer is a rewrite, and it’s an expensive one.

Roundhouse keeps Rails as the source of truth and turns the runtime into a choice you make at build time. You keep the conventions too, and they count for more now that agents write much of the code: resources :posts stands in for the routes of seven actions and their URL helpers, which no one, person or model, has to write or read. Rails to build with, and native speed to run on if Spinel gets all the way there.

The longer argument

Ten targets, one source

Browse the output
  1. Ruby
  2. Rust
  3. Go
  4. TypeScript
  5. Elixir
  6. Crystal
  7. Python
  8. C#
  9. Kotlin
  10. Swift

Ruby output runs on CRuby, JRuby or Spinel. How much of each app comes through varies, and the app pages show exactly where it stops.

Types without annotations

Rails was already typed.

has_many :comments is a type declaration nobody wrote down. Roundhouse reads the whole app and works out the rest: which class an association returns, what a column deserializes to, whether a find_by can come back nil.

No boot, no database, no annotations. The same analysis runs in your terminal, your editor, your agent and a browser IDE that never uploads your code.

Open your app in the IDEroundhouse check

app/models/post.rbRuby
class Post < ApplicationRecord
  has_many :comments
end

# Post#comments returns Comment records.
# Nobody had to write that down.
CLI · LSP · MCP · browser IDE
One engine underneath all four.

Native Ruby, through Spinel

Stay in Ruby.
Ship one binary.

Spinel is Matz’s ahead-of-time Ruby compiler. It reads a whole program, turns it into C and builds one executable, with no interpreter.

Roundhouse’s Ruby output is Ruby that Spinel can compile, because the metaprogramming is already gone; the result is one binary with, by default, a SQLite file beside it. Of the compiled targets it behaves most like Rails, since it runs Roundhouse’s framework runtime itself rather than a translation of it. Campfire runs this way today, and OCRAN does the whole compile in one command: ocran --roundhouse path/to/app.

Compile with SpinelSpinel on GitHub ↗

  1. Rails appYour app’s source
  2. RoundhouseLowers Rails, infers types
  3. Plain RubyNo runtime metaprogramming
  4. SpinelWhole program, compiled to C
  5. Native binaryRuns without Ruby installed

Roundhouse lineSpinel line

Not every app compiles yet. Spinel has to see the code at build time, so arbitrary runtime metaprogramming is out. The goal for the end of 2026 is Mastodon on Spinel.

Further readingHow Spinel worksStan Lo · contributor’s introduction

How we know it works

Rails is the oracle.

We send the same request to Rails and to the generated app, and the responses have to match, DOM node for DOM node, JSON value for value.

01

Emitted tests

Every target ships with its own test suite, and it has to pass.

02

A live comparison

Requests go to Rails and to the generated app, and the responses are compared after normalization.

03

The browser, too

Turbo updates and Action Cable get end-to-end browser tests, because a static diff can’t see them.

Faster, even in Ruby.

Lowering Rails to plain Ruby pays off on CRuby too. On the reference blog, with the same interpreter, YJIT and Puma, the generated Ruby serves 2.7× to 5.4× the requests per second of stock Rails, depending on the endpoint. On the JVM the gap on /articles is 11.2×.

Benchmarks and methodology

5.0×/articles · CRuby + YJIT

11.2×/articles · JRuby

Bench environment captured 2026-11-01, one reference app on one machine. CRuby: the same Ruby, YJIT and Puma on both sides. JRuby: the generated Ruby against stock Rails 8.0 on the JVM.

Get started

Check your app.

Install the snapshot binary and run roundhouse check on any Rails checkout. Nothing boots and nothing is uploaded. Snapshots cover macOS on Apple silicon and Linux x86-64, with untested macOS Intel and Windows builds alongside; anywhere else, build from source with Cargo.

Install guideRead the docs

Terminalsh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/roundhouse-rb/roundhouse/releases/latest/download/roundhouse-installer.sh | sh
roundhouse check --continue /path/to/your/rails/app

From Sam’s blog

Written up as it happens.

Sam Ruby writes about the project as it goes: what was tried, what the numbers say and why the design turned out this way. All posts

Open source

Our chat room runs on Spinel.

Contributors talk in Campfire, compiled by Roundhouse and running on Spinel, so everyone in it is also testing it.

A pull request doesn’t need a conversation first. Open one, or an issue, and ask for an invite.