ruby / ruby/rubygems

Add support for content addressable gems

Open
#9,654 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
4k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
81

Description

This issue will track the progress of implementing content addressable gems and skinny binary support. Sub issues will be created that will provide more detail on implementation in the CLI and server.

Background & Motivation

Today, precompiled gems ship as "fat" binaries: a single .gem (e.g. my_gem-1.1.0-arm64-darwin.gem) bundles a native binary for every supported Ruby version, even though a consumer only ever uses one.

To better support gems with native extensions, RubyGems/RubyGems.org teams agreed on a design to support "skinny" binaries instead — one small artifact per Ruby ABI — making installs faster (smaller downloads) and simplifying how maintainers build and ship precompiled gems.

The naming blocker

Gem files are named <gem name>-<version>-<platform>.gem with a uniqueness constraint. Multiple skinny binaries for the same name, version, and platform would collide.

To fix this, we replace the platform string with an 8-character checksum derived from the file contents (content-addressable naming):

my_gem-1.1.0-arm64-darwin.gem    # current
my_gem-1.1.0-bb65ajk8.gem        # content-addressable

An alternative is to encode Ruby ABI + platform tags directly into the filename. That solves the same collision problem, but it keeps growing the name as we add more distinguishing dimensions (ABI, platform, and later system requirements, Ruby engine, etc.). Decoupling that metadata from the name entirely — moving it into compact-index requirements — keeps gem names short and fixed-length, and lets us add new matching dimensions later without another naming-scheme change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified in the issue. Start by following the planned CLI and server sub-issues, then review how compact-index requirements can represent ABI and platform metadata; done means supporting content-addressable naming and skinny binary artifacts without filename collisions.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.