Opal VS MRuby

Compare Opal vs MRuby and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
Opal MRuby
36 5
4,805 5,236
0.3% 0.4%
9.1 9.8
8 days ago 7 days ago
Ruby C
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Opal

Posts with mentions or reviews of Opal. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-15.
  • RubyJS-Vite
    11 projects | news.ycombinator.com | 15 Apr 2024
    It's been a long time dream for me since about 2013 when I started getting deep into Ruby and Rails, to be able to write Ruby code for the frontend instead of JavaScript. I was a lover and adopter of CoffeeScript (which had it's flaws and imperfections), but that mostly got killed by ES6. I wrote some PoCs with Opal[1] that felt pretty good to write, but the overhead was rough (this was many years ago so things might be different now) and I never really felt like I didn't have to know about or care about the underlying javascript. I tend to discard leaky abstractions as I feel they often add more complexity than they were meant to cover in the first place.

    Has anybody used this or Opal or anything else? What is the state of "write your frontend in Ruby" nowadays?

    [1]: https://github.com/opal/opal

  • Non-code contributions are the secret to open source success
    10 projects | news.ycombinator.com | 13 Feb 2024
    Every time I see a respectable project use a Code of Conduct I remind myself that, unfortunately, Caroline Ada won[1]

    [1] https://github.com/opal/opal/issues/941

  • Coming to grips with JS: a Rubyist's deep dive
    16 projects | dev.to | 29 Dec 2023
    But we shouldn't overstate the difference: the JS and Ruby object models are actually similar in how dynamic both of them are. This makes Ruby-to-JS compilers like Opal easier to implement, according to an Opal maintainer.
  • Opal – a Ruby to JavaScript source-to-source compiler
    1 project | news.ycombinator.com | 24 Dec 2023
    This is an interview with the author of Opal, here's the project:

    https://github.com/opal/opal

  • GCC Adopts a Code of Conduct
    2 projects | news.ycombinator.com | 22 Jun 2023
    Not the OP, but from what I remember they would seek out every possible opportunity in every single possible open source community they could find and propose the CoC that they wrote. 0 contributions to the projects, with the exception of demanding that people implement incredibly verbose CoC's in their projects under the guise of "protecting the minorities contributing to the projects".

    Most infamous instance is probably this one, in the Opal repo: https://github.com/opal/opal/issues/941

    As well as this thread in the Ruby issue tracker that devolves into pure chaos with Ada refusing to actually participate in any of the valid points others bring up: https://bugs.ruby-lang.org/issues/12004

    And I'm sure there's many other instances if you look around a bit.

  • Hackers Flood NPM with Bogus Packages Causing a DoS Attack
    3 projects | /r/programming | 10 Apr 2023
    My experience with ruby for front end web dev is via https://opalrb.com/
  • The Rust Trademark Borrow Checker : Rust Foundation Solicits Feedback on Updated Policy for Trademarks
    5 projects | /r/programming | 9 Apr 2023
    Here's an example of the creator of the most adopted CoC (the Contributor Covenant) trying to get an open source contributor removed from a project due to his political opinions expressed on Twitter which she didn't like and found offensive.
  • Launch HN: Pynecone (YC W23) – Web Apps in Pure Python
    25 projects | news.ycombinator.com | 13 Mar 2023
    So ruby has a JS transpiler - opal - https://opalrb.com/

    I tried using it a little bit but the reality is if you need JS to make your app more interactable it's really worth it to just learn some JS. As soon as you need something complex the extra layer of abstraction just gets in the way and becomes more of a headache, and if you don't need anything complex then you don't need JS in the first place.

  • DebunkThis: Coraline Ada Ehmke hasn't really contributed that much as far as code goes
    1 project | /r/DebunkThis | 11 Dec 2022
    I stumbled upon this thing from years ago. I did some more digging to see what other communities thought about it. Turns out that a lot of people are really against Coraline's side.
  • All web applications may be created in the optimal environment created by Ruby, JS, and Vite.
    4 projects | /r/ruby | 30 Oct 2022

MRuby

Posts with mentions or reviews of MRuby. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-25.
  • mruby 3.2.0
    9 projects | news.ycombinator.com | 25 Feb 2023
    not an exhaustive list but https://github.com/mruby/mruby/issues/3962 has a few examples. some neat uses though
  • Sending Emails with Ruby
    2 projects | dev.to | 11 Apr 2022
    From our experience, the use of that option in a regular web app is uncommon. However, sending emails via Net::SMTP could be a fit if you use mruby (a lightweight implementation of the Ruby language) on some IoT device. Also, it will do if used in serverless computing, for example, AWS Lambda. Check out this script example first and then we’ll go through it in detail.
  • Ruby Packer: distribute your Ruby code as a compiled binary
    4 projects | news.ycombinator.com | 20 Sep 2021
    It's more on the embedded end of the spectrum, but https://github.com/mruby/mruby is another option in compiling ruby code and c extensions down to a single binary.
  • Ruby 3, Concurrency and the Ecosystem
    1 project | news.ycombinator.com | 9 Jan 2021
    They downplayed the actual amount of time that went into these changes and the upcoming changes. Here's the history:

    Matz[1] released the first version of Ruby in Dec 1995.

    DHH was a major player in getting Ruby into the global spotlight with Rails[2] in 2004. Rails got very popular as a framework for developing new applications, with Basecamp being novel, showing that it could work well and introducing people to REST, in a flexible interpretation, as well as ActiveRecord, whose ease of use and migrations became a model for modern web development.

    Rails v3 divided the community, specifically around how and what Rails would support for the server and request-handling. This hinted at problems to come, but Rails was still strong, and many took it with a grain of salt and upgraded.

    However, Twitter, which had been built on Rails became popular, and the "fail whale" emerged as they were unable to handle all of the requests. This was not a problem with scaling Rails, but with them knowing how they could scale Rails without much greater expense, but since they had to rewrite things and there was pressure to get scaling done right, they switched to Scala and Java, since Scala was functional and fast, and there was a lot of support for the JVM. Functional programming had already been making a comeback in popularity in the 2000s, because it often required a lower memory footprint and was fast. But, at that point in time, many teams and developers were looking into it.

    Though it wasn't the first time he'd done optimization, in 2012, Matz released mruby[1][3], an embedded Ruby.

    Around the same time, with functional programming having been cool, Elixir was born and some of the Rails community left for writing Ruby/Rails-ish code in Erlang.

    Some had been trying to slim down Rails in core, so that there would be less code needed to serve requests.

    Tenderlove, who came from the system programming side of things, joined the Rails core team with a focus on optimization, did work on Rack, and eventually he started working to help speed up Ruby.

    For years, Matz and others had focused on speeding up and slimming down Ruby. Ruby had run on Lighttpd and Ruby on Rails could run on it also.

    But, because the language was interpreted, it wasn't trivial.

    Another team wrote Crystal hoping that a compiled Ruby-like language would take off, and there was interest, but some of the the developers excited about Ruby and what it could do for the web had gone off to JS (Node), Python (...), Erlang (Elixir), etc.

    So, no, I don't think it's realistic that they put a year into it. At least 9+ calendar years led to this point, and it's been 26+ calendar years since initial release. And this isn't the end of it. It's not trying to compete with or tank your favorite framework or language of choice, it's just been improving and its team has been improving.

    Ruby is not Rails. But, not talking about how the history of Rails in the scope of things would be remiss. I can't think of anything in the history of Ruby that has been bad, but certainly Rails has had its "fun". But right now, it's coming together, and this shit is real.

    [1]- https://en.wikipedia.org/wiki/Yukihiro_Matsumoto

    [2]- https://en.wikipedia.org/wiki/Ruby_on_Rails

    [3]- https://github.com/mruby/mruby

  • What do you use mruby for? Is the use case purely for embedded systems?
    1 project | news.ycombinator.com | 20 Dec 2020

What are some alternatives?

When comparing Opal and MRuby you can also consider the following projects:

JRuby - JRuby, an implementation of Ruby on the JVM

Rubinius - The Rubinius Language Platform

Reactrb

yjit - Optimizing JIT compiler built inside CRuby

traveling-ruby - Self-contained Ruby binaries that can run on any Linux distribution and any macOS machine. [Moved to: https://github.com/phusion/traveling-ruby]

natalie - a work-in-progress Ruby compiler, written in Ruby and C++

ruby-packer - Packing your Ruby application into a single executable.

ruby.wasm - ruby.wasm is a collection of WebAssembly ports of the CRuby.

pony - The official fork is now maintained by benprew in http://github.com/benprew/pony