Skip to content

Instantly share code, notes, and snippets.

@YOU54F
Last active December 18, 2023 20:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YOU54F/3775e66e6090e0371c11601e6b75c305 to your computer and use it in GitHub Desktop.
Save YOU54F/3775e66e6090e0371c11601e6b75c305 to your computer and use it in GitHub Desktop.
State of Ruby packaging / executables - 2023

So you've got a cool app in Ruby, and you want to share it with your friends, but they don't love Ruby as much as you.

What do you do? Package it up along with the Ruby runtime and give it to them. Simple right? Maybe not so.

Thankfully smarter cookies than me, have tackled the problem, here is a map of the current state of play

  • Traveling-ruby
    • revisted for Ruby 2.6.10 -> 3.3.0-preview1 and arm64 MacOS/Windows in this fork
      • PR proposed upstream here
    • Rb2exe revisted to use the updated traveling-ruby releases in this fork
      • PR proposed upstream here
  • Ruby-packer
    • updated to build against ruby 3.1 in this fork
    • updated to build against multiple rubies, in this fork
      • PR proposed upstream here
  • Ocra
    • revisited for Ruby 3.2.2 via a fork titled Ocran
    • revisted by another team for multiple ruby versions titled aibika see below
  • Newcomer Tebako which builds upon principles in ruby-packer
    • Tebako is an executable packager. It packages a set of files into a DwarFS file system for read-only purposes, some details about the makeup in this blog post
    • evaluated by its author here in an SO post, this is where I randomly stumbled up on it, after working on some of the other ruby packaging projects
    • Just announced a remix of Ocra
  • Crystal
    • Ok maybe this is cheating, but using LLVM and ruby like syntax, it offers an incredibly speedy way to build cross platform, small portable binaries. I've been tickling it to build dependency free MacOS builds here
@Largo
Copy link

Largo commented Dec 15, 2023

I just want something with less magic, safe, that puts all ruby binaries into one folder. If we manage to put that folder into one file, great. I made ocran for windows, but there is no real good solution for osx yet, it seems.

Also: I'm playing around with this and it's awesome.
stephan-nordnes-eriksen/ruby_ship: A portable MRI Ruby environment and toolset

It would be cool if this had ruby
jart/cosmopolitan: build-once run-anywhere c library
Cosmopolitan Software

I also played around with mruby-cli today, but gave up.

Probably JRuby is the way:
AndyObtiva/glimmer-dsl-swt: Glimmer DSL for SWT (JRuby Desktop Development Cross-Platform Native GUI Framework) - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment