# opal/opal

Ruby ♥︎ JavaScript

Repository: https://github.com/opal/opal
Canonical: https://ross.abutalabs.com/products/opal-opal
Homepage: https://opalrb.com
Language: Ruby
License: MIT
License Family: permissive
Topics: ruby, opal, javascript, compiler, js, browser, nodejs
Last push: 2026-08-17T09:19:22+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 49, longevity 100
- inputs: {"age_days": 6340, "days_push": 16, "days_rel": 124, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4926, forks 336 (observed 2026-08-28T04:09:02.551467+00:00)

## What it is
Opal is a Ruby to JavaScript source-to-source compiler that ships with its own implementation of the Ruby corelib and stdlib. It lets developers write Ruby code and run it anywhere JavaScript runs — the browser, Node.js, Deno, Bun, or QuickJS — with two-way JavaScript interop and no runtime interpreter.

## Use cases
- compile ruby code to javascript
- write frontend code in ruby
- share ruby code between server and browser
- run ruby scripts on nodejs
- use ruby in a rails app for client-side logic
- call javascript libraries from ruby
- build browser apps without writing javascript

## When to choose
- you want to write browser or Node.js code in Ruby instead of JavaScript
- you need to share models, objects, or specs between a Ruby backend and a JS-running client
- you want ahead-of-time compilation to plain JavaScript with no runtime VM
- you use frameworks like Rails, Rack, Hyperstack, or Isomorfeus and want Ruby end-to-end

## When to avoid
- you need full CRuby compatibility — some Ruby features are unsupported on a JavaScript host
- your project is pure backend Ruby with no JavaScript target
- you need native performance or low-level control that transpiled Ruby cannot provide
- you depend on C-extension gems that cannot run in the browser

## Facets
- artifact type: library
- maturity: stable
- function: compiler, programming-language, interpreter, cli, developer-tools
- domain: programming-languages, compilers, web-development, frontend, developer-tools, cross-platform
- platform: browser, bun, cli, cross-platform
- tags: ruby-to-javascript, transpiler, source-to-source-compiler, corelib, stdlib, ruby-implementation, js-interop, isomorphic-code, nodejs, deno, web-server

## Member repositories
- opal/opal (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:02.551467+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:17:59.867835+00:00, confidence not recorded.
  - readme: https://github.com/opal/opal (fetched 2026-08-28T04:09:02.551467+00:00, sha 5b1e181485de)
  - homepage: https://opalrb.com (fetched 2026-08-29T08:59:45.169603+00:00, sha 14dfdebaf122)
  - site_page: https://opalrb.com/docs (fetched 2026-08-29T08:59:45.179180+00:00, sha d059f8ef53ba)
- Data as of 2026-08-30T08:39:29.467469+00:00.
