Add support for gems with Rust native extensions
The What
We are currently working on allowing to add Ruby gems that have native extensions written in Rust. This issue is meant to track all the necessary work to enable this from a distribution perspective.
The Why
The primary reason is that some Ruby gems come with native extensions to go beyond the capabilities of Ruby. So far the majority of extensions we use (and the ecosystem provided) were written in C, but Rust has gained some traction in this space. Some gems we use have migrated towards Rust (https://github.com/gjtorikian/commonmarker), and we even create new ones ourselves with Rust now (https://github.com/y-crdt/yrb).
Preliminary work:
Open Tasks
-
Introduce rustc to the source install instructions: https://docs.gitlab.com/ee/install/installation.html#2-ruby and include instructions for updating rubygems -
Add build tools ( rustc, …) to Omnibus Docker Images: https://gitlab.com/gitlab-org/gitlab-omnibus-builder-
Notify JiHu once these MRs are up, prior to merge, so they are prepared to make changes to their own build images.
-
-
Bump rubygemsgem version everywhere (gitlab,omnibus,CNG, …) to>= 3.3.21like here gitlab-org/gitlab!102539 (diffs) (non gnu libc support https://github.com/rubygems/rubygems/blob/master/CHANGELOG.md#3321--2022-08-24) -
Add runtime requirements here: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -
Do the same for CNG: https://gitlab.com/gitlab-org/build/CNG -
Add rustrequirements to gitlab-ruby - What version of Rust is needed? Is this available in RHEL 8.7 as well as Debian?
-
-
Notify downstream community builders (debian, freebsd)
@rmarshall if you and team could help me complete the list of "open tasks", I will power through it.
Edited by DJ Mountney