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