~/talk

From C extension to pure C: Migrating RBS

Talkat RubyKaigi 2025 · 2025-04-16..04-18· [ruby]
links:none on file
slides:none on file

RBS moves from a Ruby gem with a C extension to a pure C library that exposes a C API so tools like Sorbet (C++) and JRuby can use RBS without loading the Ruby VM. Work replaces RB_raise exceptions with bool-return error handling and out-parameters, and replaces malloc/free patterns with an arena allocator to avoid leaks and simplify early returns. Result: removes the Sorbet runtime dependency, enables multi-threaded parsing (Sorbet already type checks ~9M lines under a minute), and has an open PR and internal Shopify experiments.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:07What is RBS and why it matters
  3. 3:54RBS vs Sorbet sig syntax
  4. 7:00Why migrate RBS to pure C
  5. 10:12Ruby VM conveniences in C
  6. 11:56Error handling without exceptions
  7. 15:26Memory management challenges
  8. 21:49Arena allocators for cleanup
  9. 27:18Benefits of pure C libraries
  10. 28:20Summary and call to action
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.