Question on how to contribute to Ruby extension

35 views
Skip to first unread message

Daniel Orner

unread,
Nov 21, 2023, 4:28:25 PM11/21/23
to Protocol Buffers
Hi!

I've got lots of Ruby experience but very little C. I wanted to give it a go to fix this issue: https://github.com/protocolbuffers/protobuf/issues/6167 The `to_h` method doesn't appear in the Ruby code and appears to be defined by a C extension.

However, it isn't super obvious how Ruby calls the C code or even where it comes from. There is some C code that's bundled with the Ruby gem, but I'm not sure if that's the source of the `to_h` method or not. (There's some talk about FFI, but it seems to be disabled by default, and I'm not sure if the C code is exclusive to it or not.)

Can I get some direction on where I would even look to fix this problem, and how I could compile + test it?

Thanks very much in advance.

--Daniel
Reply all
Reply to author
Forward
0 new messages