ruby-gpgme icon indicating copy to clipboard operation
ruby-gpgme copied to clipboard

Are you interested in an FFI version?

Open sgonyea opened this issue 13 years ago • 4 comments

I'm beginning the process of converting this handy library over to FFI, so I can use it in JRuby + MRI.

https://github.com/sgonyea/ruby-gpgme/tree/ffi_ify

ruby-gpgme is currently not compatible with JRuby, as I get a bunch of issues due to C-Ext compatibility.

Would you be interested in merging in my FFI code? Otherwise, I'll release this under some name like ffi-gpgme.

sgonyea avatar Feb 11 '12 07:02 sgonyea

Cool. Does FFI work with static libraries? I think the current ruby-gpgme links statically with bundled libraries which can be found under ext/gpgme/*.

ueno avatar Feb 13 '12 02:02 ueno

+1 !

dansketcher avatar May 14 '12 05:05 dansketcher

Incidentally, changing https://github.com/sgonyea/ruby-gpgme/blob/ffi_ify/lib/gpgme/ffi.rb Line 10 from:

ffi_lib "gpgme"

to:

ffi_lib "#{File.expand_path("../../../", FILE)}/ext/gpgme/gpgme_n.bundle"

seems to do the trick...

dansketcher avatar May 14 '12 05:05 dansketcher

Cool! I sorta abandoned this and went with the JRuby Bouncy Castle library, but that's a bit of pain.

sgonyea avatar Jun 24 '12 21:06 sgonyea