New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load JRuby ext under JRuby #747
Conversation
This is awesome Charles! I'm very glad, that MRI and JRuby FFI are aligned now. I'm sorry I can't help with JRuby, but I don't use Java at all. It takes me too much time to do serious work. Anyway I'd like to work together if there are issues with C or Ruby parts. Just to clarify: This change allows to sync There seems to be no code for synchronization in jruby/jruby#5948 so far. Is this something you plan to add? |
@headius Can you answer the questions above? I'd like to merge this PR. |
@larskanis Sorry I didn't see this comment! Yes, JRuby's FFI lib and spec should now be exactly the same as from the gem. There's no syncing code in jruby/jruby#5948 because my hope is that we can source the gem contents directly, as a default gem. I have created jruby/jruby#6150 to track that change. It doesn't work properly at the moment because the "java" version of the gem contains no sources. I suggest either we include the sources there, or release a single gem that just skips the extension build on JRuby. |
Related to ffi#747 . JRuby-9.3 is expected to be fully compatible to this gem's Ruby code. This allows to ship the Ruby library code per platform java gem and add it as a default gem to JRuby.
How much smaller is it? For TruffleRuby we'll want to use the platform=ruby gem at some point to reuse the Ruby files from the gem, so I think longer term it would be simpler to only have a platform=ruby gem (also in terms of complexity of the Rakefile, etc). |
I do not have any preference between using the |
With #763 both platform gems (ruby and java) are equally usable. I also wouldn't omit the Sizes of the gems are as following: $ ll pkg/*.gem
-rw-r--r-- 1 lars lars 898048 Mär 30 21:07 pkg/ffi-1.12.2.gem
-rw-r--r-- 1 lars lars 51712 Mär 30 21:07 pkg/ffi-1.12.2-java.gem |
JRuby's FFI is almost aligned with the gem via jruby/jruby#5948. This change will allow us to use ffi.rb unmodified.