Forum: JRuby ffi + compiler2 = a viable JNI ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C673d46eb0d7135d9236cee9605b5416?d=identicon&s=25 Archiloque (Guest)
on 2009-03-13 10:02
(Received via mailing list)
Hi,

Just wondering: with ffi's jruby - C bridge and compiler2's jruby - java
bridge, would it be possible for a ffi - compiler2 combo to act as a
lightweight jni to call C from java without the daunting stub-generation
step ?

Thanks for the great stuff, etc.

A.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-03-13 20:11
(Received via mailing list)
Archiloque wrote:
> Hi,
>
> Just wondering: with ffi's jruby - C bridge and compiler2's jruby - java
> bridge, would it be possible for a ffi - compiler2 combo to act as a
> lightweight jni to call C from java without the daunting stub-generation
> step ?

Yeah, in theory that would probably work pretty well, though the
generated Java class still dynamically calls the Ruby methods. That may
be enough of a hit to matter, or it may not; it's essentially going to
be a hash hit for every call.

There's also Wayne's other FFI project, "jaffi" which intends to be a
"nice" Java FFI similar to the Ruby FFI. It's backed by the same
library, jffi, and would not have the dynamic call overhead that using
Ruby FFI does. I don't know how far along jaffi is though.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.