Spinel: compile Ruby to native binaries
Spinel is Matz's new ahead-of-time compiler: it turns a subset of Ruby into a standalone native binary. We contribute to it, and we can tell you whether your code fits.
What Spinel is
Spinel is an ahead-of-time compiler for Ruby written by Yukihiro Matsumoto (Matz), the creator of Ruby. Matz presented it in his RubyKaigi 2026 keynote. It reads Ruby source, infers types across the whole program, generates C, and compiles that to a native executable that needs nothing but the C library to run. There is no Ruby interpreter in the binary.
The price is a smaller language. Spinel supports a subset of Ruby: no eval, no methods defined at runtime, and less of the dynamic behaviour that frameworks like Rails rely on. Code written in a plain, direct style compiles; code that rewrites itself while running does not.
Where it fits
- Command-line tools. Ship one binary to your users or your servers. No Ruby version manager, no Bundler, no gems to install.
- CPU-bound jobs. Parsers, data transformation, numerical work, anything where the interpreter is the bottleneck. The Spinel project publishes benchmarks against CRuby; we measure your code rather than quote theirs.
- Small services and agents that should start fast and use little memory.
What we do
A feasibility study answers one question for one piece of your code: can it be compiled with Spinel, and is it worth it? We port it, measure it, and report what changed and what Spinel does not support yet. If something your program needs is missing from Spinel, we can usually add it upstream as follow-up work.
Our Spinel work
Sampo Kuokkanen has had more than 30 pull requests merged into Spinel, mostly in concurrency and IO: Fiber storage and blocking fibers, Fiber#transfer and Fiber#kill semantics, threads and queues, StringIO reads, and sockets. The aim of that work is the same as for a client: make real Ruby programs behave under Spinel the way they do under CRuby.
Pricing
Prices in US dollars, before tax. A price marked "from" is the minimum; we agree a fixed price before we start, and invoices in yen are fine.
Feasibility study
$2,000
fixed price, about one week
We take one program or one hot path, get it compiling with Spinel, measure it against CRuby, and write down what had to change and what Spinel cannot do yet.
Spinel development
Fixed quote
after the study
Porting code to the Spinel subset, building tools that ship as single binaries, and fixing or extending Spinel itself upstream.
Frequently Asked Questions
- Can Spinel compile our Rails application?
- No. Spinel compiles a subset of Ruby: no eval, no defining methods at runtime, and no support for the metaprogramming Rails depends on. It is for programs you control end to end, not for Rails apps.
- Is Spinel ready for production?
- It is young. It was announced at RubyKaigi 2026 and its first release, version 2026.09.12, came out in September 2026. We would use it today for internal tools and well-tested batch programs, and keep a CRuby fallback for anything critical.
- What kind of program is a good fit?
- Command-line tools you want to ship as one file with no Ruby install, CPU-heavy batch jobs, and small network services, written in plain Ruby without runtime metaprogramming.
- What have you worked on in Spinel?
- Sampo Kuokkanen has had more than 30 pull requests merged into Spinel, mostly concurrency and IO: fibers (storage, blocking, transfer, kill), threads and queues, StringIO and sockets.
Tell us about your project
Send a few lines about your application and what you need. We reply within two business days, in English or Japanese, with next steps and a rough estimate.
Other services
Rails and Ruby upgrades
Move an old Rails application to current Rails and Ruby step by step, without a rewrite and without stopping feature work. We start with a fixed-price roadmap.
Upgrade roadmap: $1,500
Ruby on Rails development
Small, well-defined Rails work at a fixed price: a first version of a new application, one feature, a fix, or monthly maintenance.
Feature or fix: from $1,000
Code audit and second opinion
An outside review of your Rails codebase, or of a proposal you have been given, written up in plain language so you can decide what to do next.
Second opinion: $500
JRuby and Java integration
Run Rails on the JVM, call Java libraries from Ruby, or embed Ruby in a Java system. We contribute to JRuby itself, so we can fix the problem where it starts.
JRuby assessment: from $2,000