Commit 44fe66e
committed
Allow to ship the JSON gem with precompiled binaries
TL;DR I'd like to propose releasing the json gem with precompiled
binaries built for different platforms and different ABI version
(fat gem).
I'm currently working on a tool to help the Ruby community ship gems
with precompiled binaries with the intent to make `bundle install`
much faster for everyone. The main bottleneck when installing gems
in a project is the compilation of native extensions.
[cibuildgem](https://github.com/Shopify/cibuildgem) modestly tries to
follow the same approach as what the python community did with
[cibuildwheel](https://cibuildwheel.pypa.io/en/stable/).
It works with a native compilation using CI runners (GitHub
it the only supported vendor for now) and tries to be as easy to setup
as possible. The json already relies on Rake Compiler for development
purposes, and because cibuildgem piggyback on top of Rake Compiler,
there is no extra configuration required.
The CI workflow in this commit was generated with the cibuildgem CLI
which reads the gemspec and determine what ruby versions needs to be
compiled and tested agains.
The tool is very new and I did many tests internally to make sure
that it create binaries that can be ported to other environment.
For instance, I used it to precompile almost all gems that a new
Rails application depends on and pushed them under a "namespaced"
name on my [RubyGems](https://rubygems.org/profiles/edouardchin),
I then confirmed that the rails application was bootable using
all those gems (I'm on MacOS).
I was hoping I could use the json gem and get the feedback of its
maintainers in order to continue the development of cibuildgem and
improve it.
- On GitHub, the earliest glibc version we can use is 2.35
(using Ubuntu 22). This means that any users that are on a linux distro
that comes with a glibc version lower than this will not be able to
install the gem with precompiled binaries. They'll have to install
the "normal" gem and specify it in their gemfile
(`gem 'json', platform: 'ruby'`).
- This workflow gets triggered manually through the GitHub action
page when you are ready to cut a release. You can optionally decide
to let the tool do the release on RubyGems (using a chechbox on the
GitHub UI). If you'd prefer doing it from your machine, you can
download the gems from the GitHub action artifacts.1 parent 9c36681 commit 44fe66e
2 files changed
+100
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
| |||
0 commit comments