opal gem - weakish/cheat GitHub Wiki

Uses Ruby gems in Opal:

  • No C/FFI gems.
  • Gems uses Opal's unsupported features, e.g.
    • String mutability
    • difference between String and Symbol
    • Filesystem, treads, shells

You can stub some missed features:

Opal::Processor.stub_file('fileutils')

And hide codes at compile time:

unless RUBY_ENGINE == 'opal'
  Code unportable to Opal here.
end