Thanks to visit codestin.com
Credit goes to github.com

Skip to content

grosser/rubinjam

Repository files navigation

Jam entire gem into a binary that works with any ruby.

  • 5KB for hello-world executables
  • Release a ruby tool as standalone executable (great for github releases)
  • Still readable, users can add debugging
  • Avoid installing a gem for each ruby version
# https://rubinjam.herokuapp.com/pack/GEM/VERSION
curl -sSfL https://rubinjam.onrender.com/pack/rake > rake && chmod +x rake
./rake --version

Pack local/non-gem

gem install rubinjam
rubinjam # convert current directory into a binary

Upload binary on gem release

Generate a github token and store it in your ~/.gitconfig with: git config --global github.token <GITHUB-TOKEN>

# Rakefile
require 'bundler/gem_tasks'
require 'rubinjam/tasks'

task release: 'rubinjam:upload_binary'

Server

The server runs via cd server && bundle exec rackup

TODO

  • ignore json gem if it has no version requirement since 1.9+ includes json
  • ruby version requirements
  • native extensions

Author

Michael Grosser
[email protected]
License: MIT

About

Covert ruby gem to universal cross-platform binary

Resources

License

Stars

Watchers

Forks

Packages

No packages published