Native Extensions. How do they work?

Native Extensions. How do they work?

Ever seen those nasty configure/make backtraces on gem install? Most of your critical product dependencies are native extensions, yet very few Rubyists understand how they work. With the Ruby VM ecosystem constantly growing, discrepancies between development and production environments and wrapped libraries not always evolving with stable interfaces, things can and will go wrong. I am the author of several bindings that runs seamless on different Ruby implementations, cursed a lot to get there and in this talk would like to touch on:

Basic structure and how extensions are loaded at runtime
The MRI C api VS foreign function interface (FFI)
Plugging into the Ruby objects ecosystem and Garbage Collection
Playing well with Threads
When things go wrong

28314d64ae18c43f6b5428dc00a48e6e?s=128

Lourens Naudé

June 06, 2012
Tweet