---
title: "Using JITs for faster FFI in Ruby"
publication: "Ruby Weekly"
issue: 738
published_at: "2025-02-13"
canonical_url: "https://rubyweekly.com/issues/738"
---

Plus a Game Boy emulator written in Ruby. |        

#​738 — February 13, 2025 

[Read on the Web](https://rubyweekly.com/issues/738)  

Together with [![Memetria\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_600,h_145/e_make_transparent/co_white,e_outline:7/vvpdctzacmq3xehpvwps.png)](https://dashboard.memetria.com/rubyweekly/)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/px3tlfgmxc7mw9usnvxe.jpg)](https://railsatscale.com/2025-02-12-tiny-jits-for-a-faster-ffi/)  

[Tiny JITs for a Faster FFI](https://railsatscale.com/2025-02-12-tiny-jits-for-a-faster-ffi/) — FFI (Foreign Function Interface) lets Ruby call dynamically-linked native libraries, but it can impose a performance tax. Aaron Patterson demonstrates this ‘FFI tax’ and experiments with JIT-compiling FFI bindings to dramatically boost performance. 

Aaron Patterson   

[The Role of Size Pools in Ruby Garbage Collection](https://patshaughnessy.net/2025/2/11/using-different-size-pools) — Garbage collection improvements have fuelled a lot of the performance gains in Ruby 3.2 onwards. As a part of his _Ruby Under a Microscope_ rewrite, Pat runs an experiment showing how Ruby uses [size pools](https://blog.peterzhu.ca/notes-on-ruby-gc/#size-pools) to speed up allocating memory for new objects. 

Pat Shaughnessy   [![\](https://res.cloudinary.com/cpress/image/upload/c_limit,w_480,h_480,q_auto/copm/1345477f.png)](https://dashboard.memetria.com/rubyweekly/) 

[Memetria K/V: Efficient Redis & Valkey Hosting](https://dashboard.memetria.com/rubyweekly/) — Memetria K/V offers Ruby applications hosting for Redis OSS and Valkey, complete with large key tracking and detailed analytics for improved data oversight and performance. 

Memetria sponsor   

**IN BRIEF:** 

- If you use `net-imap` it's time to upgrade [as there's a potential DoS vulnerability.](https://www.ruby-lang.org/en/news/2025/02/10/dos-net-imap-cve-2025-25186/)
- 🇺🇸 If you're near Chicago, there's [a ChicagoRuby meetup at the Adler Planetarium](https://www.meetup.com/chicagoruby/events/305503069/) this March 5. Ifat Ribon and Noel Rappin will be speaking there.
- You might be using [Kamal](https://kamal-deploy.org/) to deploy your Rails apps now, but remember it can [deploy anything, including WordPress.](https://losangelesaiapps.com/deploying-wordpress-with-kamal-2/)   

[Ruby Source Parsing](https://alchemists.io/articles/ruby_source_parsing) — A look at several interesting ways to dynamically work with Ruby source and to extract useful information. 

Brooke Kuhlmann   

[Flexible API Versioning with Rails](https://petr.codes/blog/rails/flexible-api-versioning-with-rails/) — There are two truths about API versioning: 1. It’s required. 2. It’s hard to do right. Petr offers an example of how fast it can go wrong, followed by a more maintainable method to keep things sensible. 

Petr Hlavicka   

[Fixing `asdf` 0.16.x Breakages](https://blog.driftingruby.com/asdf-0-16-x/) — Last week, we mentioned that the popular [asdf](https://asdf-vm.com/) runtime version manager was [entirely rewritten in Go.](https://stratus3d.com/blog/2025/02/03/asdf-has-been-rewritten-in-go/) This caused Dave’s setup to break and here’s how he fixed it. 

Dave Kimura   

[Seamless Rails Upgrades: Expert Maintenance. Fixed Price](https://reinteractive.com/service/code-care) — Upgrade RoR smoothly. We offer expert Rails maintenance at a fixed price. Secure, performant, minimal disruptions. Outdated gems? Breaking changes? We handle it. 

reinteractive / CodeCare sponsor   

✏️ [Electronic Signatures with Rails](https://hybrd.co/posts/electronic-signatures-with-rails) – Wrapping a JavaScript (written) signature library in a Stimulus controller and bringing it into a modern Rails app. Jeremy Smith 

📄 [Rails Async Queries by Example](https://www.honeybadger.io/blog/rails-async-queries/) – Rails 7 introduced a way to run multiple Active Record queries concurrently using background threads. Julie Kent 

📄 [Ordinal Numbers in Rails: 1st, 2nd, 3rd, 4th](https://andycroll.com/ruby/ordinal-numbers-in-rails-1st-2nd-3rd-4th/) – Rails’ `ordinal` and `ordinalize` methods are waiting for you. Andy Croll 

📄 [How to Implement Relationship-Based Access Control (ReBAC) in a Rails API](https://auth0.com/blog/what-is-rebac-and-how-to-implement-rails-api/) Carla Urrea Stabile (Auth0) 

📄 [How to Customize IDs in URLs in Rails Apps](https://thoughtbot.com/blog/how-to-customize-ids-in-urls-in-your-rails-app) Joël Quenneville  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/s1p3lgwt8shgjvcfcpot.jpg)](https://rhino-editor.vercel.app/)  

[Rhino Editor: An Action Text Compatible Rich Text Editor](https://rhino-editor.vercel.app/) — As well as being a clean, simple rich text editor, a big selling point is being able to use [ProseMirror](https://prosemirror.net/) and TipTap plugins, as well as [some good docs page.](https://rhino-editor.vercel.app/how-tos/customizing-the-toolbar/) 

Konnor Rogers   

🔭 [Ephem: Track Positions of Space Objects Accurately in Ruby](https://dev.to/rhannequin/introducing-ephem-5827) — From the creator of the [Astronoby](https://github.com/rhannequin/astronoby) astrometry gem comes a new space-themed release for tracking the position and velocity of ‘major Solar System bodies’ using data supplied by NASA. 

Rémy Hannequin   

[🫠 AI Isn’t Magic, and It Isn’t Here to Save You](https://link.testdouble.com/ytf) — It won’t fix messy workflows, tech debt, and shaky fundamentals on its own. AI doesn’t replace developers—it raises the bar for them. 

Test Double sponsor   

[ImageProcessing 1.14: High-Level Image Processing Wrapper for libvips and ImageMagick](https://github.com/janko/image_processing) — _“The goal of this project is to have a single gem that contains all the helper methods needed to resize and process images.”_ 

Janko Marohnić   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/ggmkexz1oa1kr35gtfjz.jpg)](https://sacckey.github.io/rubyboy/)  

[Ruby Boy: A _Game Boy_ Emulator Written in Ruby](https://sacckey.github.io/rubyboy/) — A fun one! You can play it in the browser, too, thanks to WebAssembly and [ruby.wasm](https://github.com/ruby/ruby.wasm). ([GitHub repo.](https://github.com/sacckey/rubyboy)) 

sacckey   

- [JRuby 9.4.12.0](https://www.jruby.org/2025/02/11/jruby-9-4-12-0.html) – The JVM-based Ruby implementation targeting Ruby 3.1 compatibility.
- [Grape 2.3](https://github.com/ruby-grape/grape) – Long standing opinionated DSL for creating RESTful APIs.
- 💬 [Slack Ruby Client 2.5](https://github.com/slack-ruby/slack-ruby-client) – Access Slack's Web, Real Time Messaging and Event APIs in Ruby or via a CLI.
- [ActiveRecord PostGIS Adapter 11.0](https://github.com/rgeo/activerecord-postgis-adapter) – Use PostGIS's geospatial features from Active Record.
- [EvilSeed 0.7](https://github.com/evilmartians/evil-seed) – Gem to create anonymized dumps of your database.
- 🤖 [telegram-bot-ruby 2.4](https://github.com/atipugin/telegram-bot-ruby) – Ruby wrapper for Telegram's Bot API.
- [RDoc 6.12](https://github.com/ruby/rdoc/releases/tag/v6.12.0) – Ruby's long standing documentation generator.
- [Rage 1.13](https://github.com/rage-rb/rage/releases/tag/v1.13.0) – HTTP API framework compatible with Rails.
- [Good Job 4.9](https://github.com/bensheldon/good_job) – Postgres-backed job queue for Rails.
- [Ruby OpenAI 7.4](https://github.com/alexrudall/ruby-openai) – Use OpenAI's APIs from Ruby.
- [Passenger 6.0.25](https://blog.phusion.nl/2025/02/12/passenger-6-0-25/)      

📰 Classifieds   

**Your codebase is a masterpiece**. Your logs? Abstract expressionism. Make your data gallery-ready with [Scout Monitoring](https://www.scoutapm.com/ruby-monitoring/?utm_content=02-13-2025&utm_medium=cooperpress&utm_source=sponsorship). 

--- 

☢️ [Tech debt, performance or dev process problems in your app?](https://sinaptia.dev/services/application-assessment) Our Application Assessment service can help you figure out how to deal with them. 

--- 

🔎 **Know Your Vehicle** – [Our Specifications API](https://api.carsxe.com/vehicle-specifications?utm_source=Cooper+Press&utm_medium=email&utm_campaign=Cooper-press-feb-12) decodes VINs to reveal trim, engine and more in seconds with over 250 data points! [Try it now](https://api.carsxe.com/vehicle-specifications?utm_source=Cooper+Press&utm_medium=email&utm_campaign=Cooper-press-feb-12). 

--- 

🧑‍💻 **Need Ruby Developers?** [Hire expert LATAM talent](https://www.tecla.io/network/nearshore-ruby-on-rails-developers)—bilingual, time zone-aligned, and pre-vetted for fast results. [Start interviewing today!](https://www.tecla.io/network/nearshore-ruby-on-rails-developers)    

📢 Elsewhere  

A quick roundup of some of other interesting updates or useful resources in the broader developer landscape: 

- Beej, author of [numerous popular guides](https://beej.us/guide/) to programming concept, has [released _Beej's Guide to Git_](https://beej.us/guide/bggit/), a great zero-to-expert online resource for using the world's most popular DVCS.
- [DB Fiddle](https://www.db-fiddle.com/) is a handy online database 'sandbox' for playing with various versions of MySQL, Postgres, and SQLite direct from the browser.
- We've got great options like [Trix](https://trix-editor.org/) and [Marksmith](https://avohq.io/blog/ruby-on-rails-markdown-editor-marksmith) but if you need to consider a more mainstream text editor framework, [this post boils down some popular options.](https://liveblocks.io/blog/which-rich-text-editor-framework-should-you-choose-in-2025)
- Esteemed tech publisher Tim O'Reilly talks about [the end of programming as we know it](https://www.oreilly.com/radar/the-end-of-programming-as-we-know-it/) in the LLM and 'chat-oriented' era.
- [Go 1.24 has been released.](https://go.dev/blog/go1.24)         

Curated by [Peter Cooper](https://twitter.com/cooperx86) and [Glenn Goodrich](https://twitter.com/ruprict).
Published by [Cooperpress](https://cooperpress.com/). 

[Change your email](https://rubyweekly.com/edit_subscription/*|UID|*) or [Stop getting this newsletter.](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Other weekly newsletters we publish include [Postgres Weekly](https://postgresweekly.com/), [React Status](https://react.statuscode.com/), [Frontend Focus](https://frontendfoc.us/), and [JavaScript Weekly](https://javascriptweekly.com/).
