I've finally started working on the FFI bindings for the RBS Ruby static type annotation library! Pretty far out of my comfort zone, but I have a dynamic library building and basic entry points binding. Unexplained segv has me stuck. Help wanted!

https://github.com/ruby/rbs/pull/2572

FFI support by headius · Pull Request #2572 · ruby/rbs

This PR will build out support for loading the RBS library via FFI, avoiding the C extension on implementations that don't support the CRuby extension API.

GitHub
@headius I'm not the person to help with this but do I understand correctly: this is a gem that includes some C wrapped by hand and you want to have it use FFI instead? (Yay! FFI is smart 😸. Me, I've been working on tools for easing binding with FFI but I've been working with C headers, hadn't considered C chunks written for ruby.)
@calicoday that is correct. This library used to be just a c extension, but it was pulled out into a stand-alone library for use from other languages. I'd love to see what you're working on to make FFI binding easier!

@headius Cool. I think FFI really a better way than custom. Love to talk to you about my proj! But (as Evie puts it in The Mummy) I've just made a bit of a mess in the library... I'll just put things back together and let you know. 😹

Actu, a proper overview doc is quite overdue. Happy to have the incentive to get on with it. Would an email be appropriate?