Skip to main content

Ruby Artifact

Portable, self-contained distribution of the Ruby interpreter. This repository is consumed by the Embedbits Platform Artifact Handler to locate, download, verify, and configure a Ruby interpreter in downstream embedded build tooling — primarily to run the CMock mock generator and the Unity test-runner generator scripts without depending on whatever Ruby is (or is not) installed on the host machine.

This repository is split into three branches/refs by role — the main (master) branch you are reading now holds only this documentation; the handler scripts live on the Core branch, and versioned binaries are published as GitHub Releases anchored to the Bin branch.


Repository contents​

main / master
└── README.md ← This document — no other content

Core
├── ArtifactConfig.cmake ← Artifact metadata (name, version constraints, asset naming)
└── CMakeRubyDefaults.cmake ← Ruby integration logic (interpreter path setup)

Bin (anchor branch — no tracked binary files)
└── (empty commits only; each release tag points here)

Role in the platform​

Upstream GitHub (Embedbits)
────────────────────────────────────── ──────────────────────────────────────────
oneclick/rubyinstaller2 Artifact-ruby
rubyinstaller-<ver>-<rev>-x64.7z ──► main / master → README only (this document)
Homebrew/homebrew-portable-ruby Core → ArtifactConfig.cmake, CMakeRubyDefaults.cmake
portable-ruby-<ver>.<os>.bottle.tar.gz Bin → Anchor branch (empty commits)
Releases → ruby-<version>-<platform>.zip + .hash
tagged Bin/<version>-<platform>

Ruby upstream only publishes source code, so Ruby_Importer.sh combines two well-maintained sources of portable builds and repacks both to .zip with the Ruby installation root (bin/, lib/, ...) at the top level of the archive.


Supported platforms​

Platform codeTargetUpstream source
WinWindows x86_64 (UCRT)RubyInstaller2 — portable .7z archive (no installer, no MSYS2 DevKit)
UnixLinux x86_64 (glibc)Homebrew portable-ruby — x86_64_linux bottle
DarwinARMmacOS arm64 (11+)Homebrew portable-ruby — arm64_big_sur bottle

Version coverage differs per platform. RubyInstaller2 publishes every Ruby release, whereas Homebrew only builds the versions Homebrew itself vendors. A given version may therefore exist as Bin/<version>-Win only. Pick a version available for every platform your project needs (e.g. 3.4.5).

Where an upstream repackages the same Ruby version (RubyInstaller -<rev> suffix, Homebrew _<rev> suffix), only the highest revision is imported. Upstream prereleases are ignored.


Branch structure​

Branch / RefContent
main / masterThis README only — no functional content
CoreCMake handler scripts for consuming the artifact
BinAnchor branch only — no binaries are committed here
Release tag Bin/<version>-<platform>GitHub Release carrying the .zip archive and its .hash checksum file

Note: On a Git host without a Releases API (Azure DevOps), the same importer commits the .zip + .hash directly to the Bin branch and tags that commit Bin/<version>-<platform>. The CMake handler resolves either form transparently.


Fetching a release​

gh release download Bin/3.4.5-Unix --repo Embedbits/Artifact-ruby --pattern "ruby-3.4.5-Unix.*"

Package layout​

ruby-<version>-<platform>.zip
├── bin/ ← ruby / ruby.exe, gem, bundle, ...
├── lib/ ← standard library and default gems
└── ...

Versioning​

Artifact versions correspond directly to Ruby release versions:

3.3.8, 3.4.5, 4.0.7, ...

Notes​

  • No installation required — both upstream builds are relocatable and run from any directory.
  • The Windows build does not include the MSYS2 DevKit, so gems with native C extensions cannot be compiled with it. Pure-Ruby tools such as CMock and the Unity scripts do not need it.
  • Offline use is supported once the artifact is cached locally.

License​

Ruby is distributed under the Ruby License / BSD-2-Clause dual license. For details, see: https://www.ruby-lang.org/en/about/license.txt

The RubyInstaller2 and Homebrew portable-ruby builds bundle additional third-party libraries (OpenSSL, libyaml, libffi, zlib, and others), each under its own license.


Authors​

Contributions are welcome! Please open a pull request.