Packing your Ruby application into a single executable
summary
A tool called ruby-packer compiles a Ruby runtime, project files and small libraries into a single executable (examples shown at ~33–46 MB) that runs on Windows, macOS and Linux and self-updates by downloading and replacing itself. The packer embeds a compressed SquashFS image in-memory at __enclose_io_memfs__, uses libsquash to mirror filesystem syscalls, issues virtual file descriptors for packed files, extracts native extensions to temp files at dlopen time, and redirects Rails’ writable paths to temporary directories so apps actually run. libautoupdate provides the auto-update protocol.
AI-written summary · about
chapters (9)
- 0:00Single executable Ruby apps
- 3:00Traditional Ruby distribution problems
- 5:36Benefits of single executable
- 7:51Introducing ruby-packer
- 12:43Virtual file system
- 17:10Technical implementation with libsquash
- 21:51SquashFS and cross-platform
- 24:03Native extensions and Rails
- 27:08Packaging process
related talks
53mDeployable Ruby Runtimes
40mSelf-Contained, Source-Free, Executable Ruby Applications with Warbler
35mmruby: a Packaging Story Filled with Freedom
36mTBA
26mmruby: a Packaging Story Filled with Freedom
41mRuby for Embedded Applications
48mPolishing Rubygems
38mRubyX: Compiling Ruby and it's effect on the community
