Ruby inventor Matz working on native compiler with AI help
Jump to main content
Search
REG AD
DevOps
Ruby inventor Matz working on native compiler with AI help
Matz gets together with Anthropic's Claude to create an experimental ahead-of-time compiler for Ruby – though with many limitations
Tim Anderson
Tim<br>Anderson
Published<br>wed 6 May 2026 // 14:49 UTC
Yukihiro Matsumoto - better known as Matz - is building Spinel, a native compiler for Ruby, with help from Anthropic's Claude Code.<br>Spinel, which is on GitHub under the MIT license, works by parsing Ruby code into AST (abstract syntax tree)<br>files, then converting it to C code for compilation by a standard C<br>compiler. In Matz’s tests, Spinel-compiled code runs approximately 11.6<br>times faster than MiniRuby - a stripped-down Ruby build - using the in-development Roby 4.1.0.<br>The output is C code, compilable to a native executable via gcc (GNU Compiler Collection) on Linux or Windows (with MinGW - Minimalist GNU for Windows), or via LLVM's Clang on Linux or macOS. BSD will "probably work", according to the readme, but is not tested.
REG AD
Ruby is an interpreted language, meaning it depends on<br>a runtime engine to parse and run the code. In order to improve performance,<br>Ruby can use just-in-time (JIT) compilers including MJIT (method-based JIT), YJIT<br>and ZJIT, with the latter two developed by Shopify, a prominent Ruby user.<br>Spinel is different in that it generates standalone native code executables,<br>which can be deployed without any additional runtime.
REG AD
The downside of Spinel is that it supports only a subset of<br>Ruby. Unsupported features include eval statements, which evaluate and execute<br>Ruby code at runtime, threads, text encoding other than UTF-8, metaprogramming<br>such as defining a method at runtime, and deeply nested lambda functions.<br>Ruby variables are not typed, though objects are strongly<br>typed. Spinel performs type inference to enable C code generation, since C is a<br>strongly typed language. The code makes use of an existing and mature Ruby<br>parser called Prism. There are many optimizations, such as method inlining and<br>dead code elimination, and the generated C compiles cleanly at the default<br>warning level. Spinel includes a garbage<br>collector, to reclaim memory automatically, and supports FFI (foreign function<br>interface) for integrating with native code libraries such as libc or SQLite.<br>Spinel is experimental and will not work with most existing<br>Ruby code, including the web application framework Ruby on Rails. But it is<br>possible for Ruby developers to write code with Spinel in mind, such as<br>for helper functions that can then be called from other Ruby code, as a means<br>of optimization.
MORE CONTEXT
Bun posts Rust porting guide, says rewrite is still half-baked
Cloudflare experiment ports most of Next.js API 'in one week' with AI
Anthropic tests how devs react to yanking Claude Code from Pro plan
Brit mathematician lets AI agent loose with credit card – cue password leaks, CAPTCHA chaos and more
Matz presented Spinel at RubyKaigi 2026, a conference in<br>Hakodate, Japan last month. According to attendees such as this one (original text in Japanese) Matz said the idea for Spinel was conceived three years<br>ago, but has now been implemented in a few weeks using AI.<br>Most of the code in<br>the Spinel repository is headed with a comment including "co-authored by:<br>Claude Open 4.7 (1M context)."<br>Further, the project has already been rebuilt three<br>times over, in a series of experiments.<br>Matz, perhaps, is an ideal user of AI-generated code. He<br>understands the code, and can benefit from the increased speed of development<br>without losing grip on what the code does, and is able to refine it with his existing<br>skills as well as with further AI prompting, and the code is covered by hundreds<br>of tests and benchmarks. ®
developer<br>anthropic claude<br>devops<br>ruby
REG AD
Security
Troops’ phones gave away location data to foreign adversaries
Lawmakers push DoD to tighten smartphone controls after adversaries exploited commercial tracking data
Security
Disgruntled 0-day hunter 'humiliated' by Microsoft pledges 'bone shattering drop' as Redmond calls cops
Six 0-days, three under active exploitation, more to come on July 14?
THE REGISTER EXPLAINER
Explainer: Edge AI
You can run AI at the edge, if your infrastructure supports it
AI + ML
Snowflake buys Natoma to help freeze out rogue agents
It is the database titan’s sixth acquisition announcement since June 2025
Systems
EU's digital sovereignty boo-boo may be the best thing to ever happen to the project
DIY or die. Just don't let the CIA buy it
off prem
Google, Canonical team up to certify Ubuntu images for TPU VMs
Chocolate Factory shifts Tensor Processing Unit Ubuntu support back upstream
MOST POPULAR
AI + ML
Google has seriously leaned into AI enshittification lately
Security
Anthropic to release Mythos-class models to the public
Systems
Intel's CEO reveals early hiring challenges as...