ruby-ll
ruby-ll copied to clipboard
Port libll to pure Ruby; Opal support
I am tasked with porting some Ruby libraries to JavaScript by using Opal (an alternative Ruby runtime, like JRuby, but targeting JavaScript runtimes). Like JRuby, it doesn't support C extensions (or Java for that matter), so I had to port the extension to pure Ruby. This implementation may be also usable to make Ruby-LL work on other Ruby runtimes, like MRuby.
I have considered porting libll directly to JavaScript, but performance is of secondary importance for the project I'm working on, but I may later revisit the idea.
In addition, I added tests for running the test suite under Opal-RSpec, so that we can be sure that Ruby-LL works under Opal.
I have made a similar patchset for Oga, but it is still a work in progress.
This PR has been sponsored by Ribose Inc. ref: plurimath/plurimath#159