# Spinel: Matz Releases a Self-Hosting Ruby AOT Compiler — 11.6× Faster, Built With Claude

> Ruby's creator built a self-hosting AOT compiler in one month with Claude — it runs Ruby 11.6× faster as a standalone native binary.

- Org: matz
- Date: 2026-04-24
- Category: tool, repo
- Source: https://github.com/matz/spinel
- Canonical page: https://ai-tldr.dev/releases/matz-spinel-ruby-aot/

## In short

Ruby creator Yukihiro Matsumoto released Spinel, a self-hosting AOT compiler that turns Ruby into standalone native binaries with no runtime deps. Built in ~1 month with Claude. 11.6× geometric mean speedup over CRuby across 28 benchmarks; 86.7× for Game of Life. Debuted at RubyKaigi 2026.

## What it is

Spinel is an ahead-of-time compiler for Ruby released April 24, 2026 by Yukihiro 'Matz' Matsumoto and debuted at RubyKaigi 2026. Written in Ruby (self-hosting — the 21,000-line backend compiles itself), it converts Ruby source to standalone native executables linked only against libc and libm. Supported: classes, inheritance, mixins, blocks, exceptions, pattern matching, fibers, BigInteger, Regexp. Excluded by design: eval, send, method_missing, threads — trades dynamism for static analysis tractability. Matz built it in approximately one month using Claude as a coding partner.

## How it works

Spinel parses Ruby via libprism (the official Ruby parser), serializes the AST, then runs whole-program type inference followed by C code generation. The generated C is compiled with a standard C compiler into a native binary. The bootstrapping is iterative: Spinel compiles itself, verifying self-hosting at each step. The type inference is whole-program — it sees all method calls before generating any code — which enables tighter optimization than JIT approaches that compile hot paths incrementally.

## Why it matters

Spinel is the most dramatic Ruby performance project since YJIT, and notable on two levels. Technically, the 11.6× geometric mean speedup (86.7× for Game of Life) shows what's possible when Ruby's dynamic features are traded for static compilation — directly relevant for compute-heavy Ruby workloads like scientific computing or CLI tooling. Culturally, Matz building a 21,000-line compiler in a month with AI assistance is a striking demonstration of AI-accelerated systems programming from one of the field's most respected language designers.

## Who it's for

Ruby developers running compute-intensive workloads, CLI tool authors, systems programmers

## Try it

git clone https://github.com/matz/spinel

## Links

- [GitHub](https://github.com/matz/spinel)
- [HN Discussion](https://news.ycombinator.com/item?id=47887334)
