RubyKaigi 2025 – Migrating RBS’s parser to pure C
I had the great pleasure to present my team’s work at RubyKaigi 2025, in Matsuyama, Japan. This was my first ever conference talk, at the largest international conference for the Ruby programming language, no less!
Video
Nailed my introduction. 😄
Slides
Here is the original Keynote file with animations, and a more universal PDF export.
Summary
From C extension to pure C: Migrating RBS
Learn how we migrated RBS to remove its dependency on the Ruby VM and expose a new C API. In addition to being faster and more memory-efficient, it’s now more portable: tools like Prism, Sorbet, JRuby and TruffleRuby will be able to use RBS directly. Type checkers like Steep and Sorbet will now be able to parse multiple RBS files in parallel, unconstrained by the GVL.
The Ruby VM offers many luxuries that can help ease C extension development, such as garbage collection, exceptions, and the many built-in data structures like Array
and Hash
. Unfortunately, to be maximally portable and multi-threaded, some C extensions like RBS and Prism will need to forego these conveniences. We’ll show techniques for replicating them in pure C.
Join us to explore advanced techniques in writing C extensions and see how this universal RBS parser paves the way for improved tooling and collaboration in the Ruby ecosystem.
Further reading
- See the Sorbet documentation page on RSB support.
- Two related RubyKaigi 2025 talks from my team:
- The huge PR that landed our changes.