Analysis updated 2026-08-12 · repo last pushed 2026-03-05
Build a Ruby library using Ractors that also works on JRuby or TruffleRuby without crashing.
Write code against the upcoming Ruby 4.0 Ractor API before it officially ships.
Run Ractor-based Ruby code on older Ruby versions (2.7 through 3.4) that lack native Ractor support.
| eregon/ractor-shim | eclectic-coding/rails_health_checks | ruby/tmpdir | |
|---|---|---|---|
| Stars | 14 | 14 | 14 |
| Language | Ruby | Ruby | Ruby |
| Last pushed | 2026-03-05 | — | 2026-07-13 |
| Maintenance | Maintained | — | Active |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Install the gem with Bundler or gem install, no external dependencies or infrastructure required.
Ractor-shim is a small Ruby gem that lets code written for Ruby's Ractor feature run on Ruby versions or implementations that don't natively support Ractors. Ractors are Ruby's relatively new way to run code in true parallel, but not every Ruby environment includes them. This gem fills that gap so the same code can work everywhere without modification. At a high level, it recreates the Ractor API using Ruby's older building blocks: threads and queues. If your Ruby environment already has Ractors built in, the gem steps aside and does nothing. If it doesn't, the gem defines a compatible version of Ractor using those underlying threading tools. It also provides a preview of the upcoming Ruby 4.0 Ractor API for current standard Ruby versions (2.7 through 3.4), so you can write code against the newer interface before it officially ships. This is useful for developers building Ruby applications that need to run across different Ruby implementations, for example, someone writing a library that uses Ractors but wants it to also work on TruffleRuby or JRuby, which run Ruby code in parallel threads rather than using native Ractors. Without this gem, code that calls Ractor.new would simply crash on those platforms. With it, the same code runs, taking advantage of the parallel threading those implementations already provide. One notable tradeoff: when Ractors aren't natively available, the gem's version of Ractor.make_shareable, a method normally used to safely share objects between parallel workers, simply returns the object unchanged. This skips the usual deep-freezing step for performance reasons, reasoning that the standard behavior makes objects immutable anyway, so there's no practical risk. This keeps things fast but relies on code being well-behaved.
A small Ruby gem that lets code using Ruby's Ractor parallel-execution feature run on Ruby versions and implementations that don't natively support Ractors, falling back to threads and queues.
Mainly Ruby. The stack also includes Ruby.
Maintained — commit in last 6 months (last push 2026-03-05).
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.