Skip to content
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

[DRAFT] Support for TruffleRuby/GraalVM #125

Draft
wants to merge 82 commits into
base: master
Choose a base branch
from

Conversation

jouhlmann
Copy link

@jouhlmann jouhlmann commented Aug 21, 2020

As part of a university project we tried to explore different options to support PyCall running on TruffleRuby (GraalVM). The choices we made are:

  • Using wrappers on top of Graal's Polyglot API (necessary to support API/behavioral differences compared to PyCall)
  • Disable native extension build for TruffleRuby (currently not compatible)
  • Rewrite/duplicate some files for TruffleRuby and load them conditionally if RUBY_ENGINE=='truffleruby'

In the current form it's working fine and passes almost all Unit Tests (except some that depend on native extensions and half of spec/conversion_spec.rb), but judging by code-review by @eregon the current structure of having duplicated code for the TruffleRuby variant might make it unmaintainable. Our thought was that merging the code and adding a lot of if RUBY_ENGINE=='truffleruby' might also be suboptimal.

We would like to ask you for your feedback: What do you think? What should be improved? How do you feel about enabling PyCall to run on TruffleRuby (GraalVM)?

(/cc @stefreschke @eregon @fniephaus)

stefreschke and others added 29 commits August 15, 2020 16:51
…stefreschke/pycall.rb into use-conversion-for-type-matches

� Conflicts:
�	lib/pycall/truffleruby/pyobject_wrapper.rb
…stefreschke/pycall.rb into use-conversion-for-type-matches

� Conflicts:
�	lib/pycall/truffleruby/conversion.rb
…stefreschke/pycall.rb into use-conversion-for-type-matches

� Conflicts:
�	lib/pycall/truffleruby/dict.rb
�	lib/pycall/truffleruby/pycall.rb
�	lib/pycall/truffleruby/pytypeobject_wrapper.rb
�	lib/pycall/truffleruby/slice.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants