hermann icon indicating copy to clipboard operation
hermann copied to clipboard

Investigate using FFI instead of writing C extensions

Open rtyler opened this issue 10 years ago • 1 comments

FFI looks like it has matured enough to where we could delete all the custom C code in this repository and just use FFI bindings.

Couple of open questions:

  1. Retaining Hermann::Result objects through the FFI callbacks support, will that "just work".
  2. Using FFI with static and/or dynamically libraries? What does this mean for the embedded librdkafka

The more we can match the Hermann::Provider::JavaProducer API the better

rtyler avatar Oct 21 '14 16:10 rtyler

  1. here looks like you can pass back complex types, some kind of casting.
#objptr is a struct *
#this is ruby
objptr = MyLibrary.create_object("my object")
  1. not sure, would it require something different to building librdkafka.a in the extconf.rb?

jamescway avatar Oct 25 '14 20:10 jamescway