EVERYTHING XIAOMI
Get listed

Opal

Opal is a Ruby-to-JavaScript source-to-source compiler that translates Ruby ahead of time into plain JavaScript, without a runtime interpreter.

Place
#12 of 28
Score
6.4
Opal's website

What Opal is

Opal is a Ruby-to-JavaScript source-to-source compiler that translates Ruby ahead of time into plain JavaScript, without a runtime interpreter. It includes implementations of Ruby's core library and standard library. Ruby can call JavaScript, JavaScript can call Ruby, and native JavaScript classes can be treated as Ruby classes. The project also describes sharing a gem, objects, and specs between server and client code. Opal can run in browsers and JavaScript environments such as Node.js, Deno, Bun, and QuickJS. Its upcoming 2.0 release targets ES2021; the listed browser support for that release covers current and previous stable Firefox, Chrome, Safari, and Edge, but not Internet Explorer. Opal 2.0 has no fallback transpilation for older JavaScript engines. Integrations are listed for Rails, Sinatra, Roda, and static apps. Installation is through `gem install opal` or by adding the gem to a Gemfile. Opal is MIT-licensed and free, with CLI and API access.

Good

  • Compiles Ruby ahead of time to plain JavaScript.
  • Includes Ruby core and standard library implementations.
  • Supports calls between Ruby and JavaScript.
  • Runs in browsers and several JavaScript environments.
  • Free and MIT-licensed.

Watch out

  • Opal 2.0 does not support Internet Explorer.
  • Opal 2.0 has no fallback for older JavaScript engines.
  • Opal 2.0 targets ES2021.

Who it suits

Opal suits Ruby developers who want to use Ruby code in browser or JavaScript environments. Its ES2021 target and lack of older-engine fallback are relevant for teams choosing where that code will run.

Verdict

Opal bridges Ruby and JavaScript, with interop in both directions and several listed execution environments. Check the 2.0 browser and JavaScript-engine requirements against the environments you need to support.

Plans and prices

From Opal's own pricing page, checked 7 Oct 2026.

All about pricing
PlanPriceWhat it gives you
OpalFreeMIT-licensed software

The facts

Each one read from Opal's own pages, with the date it was checked.

Where it runs

Browsers
For the upcoming 2.0 release, the project lists current and previous stable Firefox, Chrome, Safari, and Edge as supported and says Internet Explorer is unsupported.checked 7 Oct 2026

What it does

Code sharing
The project describes using the same gem, objects, and specs on both the server and client.checked 7 Oct 2026
Compilation
Opal compiles Ruby to plain JavaScript ahead of time, without a runtime interpreter.checked 7 Oct 2026
Execution targets
The project says Opal can run in browsers and in JavaScript environments including Node.js, Deno, Bun, and QuickJS.checked 7 Oct 2026
Framework integrations
The project lists integrations for Rails, Sinatra, Roda, and static apps.checked 7 Oct 2026
JavaScript interop
Opal supports calling JavaScript from Ruby and Ruby from JavaScript, and treating native JavaScript classes as Ruby classes.checked 7 Oct 2026
License
Opal is released under the MIT License.checked 7 Oct 2026
Rails usage
The official homepage shows using opal-rails in a Rails app and requiring opal_ujs and turbolinks in its example.checked 7 Oct 2026
Ruby compatibility
The repository says the gemspec declares Ruby >= 2.3 and CI exercises Ruby 3.0 through 4.0 and JRuby.checked 7 Oct 2026
Ruby installation
The project instructs users to install Opal with `gem install opal` or add the gem to a Gemfile.checked 7 Oct 2026
Runtime requirement
Opal 2.0 targets ES2021 and has no transpilation fallback for older JavaScript engines.checked 7 Oct 2026
Support
The project directs users to Slack, Stack Overflow with the #opalrb tag, and GitHub issues for bugs and feature requests.checked 7 Oct 2026
What it does
Opal is a Ruby-to-JavaScript source-to-source compiler that includes an implementation of Ruby corelib and stdlib.checked 7 Oct 2026

The company

Maker details
The opened official pages identify Adam Beynon in the license copyright notice but do not state a headquarters or founding date.checked 7 Oct 2026

Alternatives to Opal

All alternatives
  1. 1

    JSweet

    Free planOpen sourceAndroidiOSWebAPI
    7.7Free plan
  2. 2SWC logo

    SWC

    Free planAndroidWebAPILinux
    7.1Free plan
  3. 3

    Transcrypt

    Free planWebLinuxmacOSSelf-hosted
    6.7Free plan
  4. 4
    6.6Free plan
  5. 5

    Google Web Toolkit

    Free planWebExtensionLinuxmacOS
    6.5Free plan
  6. 6

    Haxelib

    Free planAPILinuxmacOSWindows
    6.5Free plan