Skip to content

Conversation

@moznion
Copy link

@moznion moznion commented Nov 23, 2025

This pull request adds the --enable-zjit option to each configure invocation to enable ZJIT.

Example after this patch is applied:

root@47c230db30e9:/# ruby --zjit --version
ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +ZJIT +PRISM [aarch64-linux]

And this also upgrades the rustc version because the ZJIT runtime requires edition2024.

Note: On versions that do not support ZJIT, the --enable-zjit option is ignored (ref: https://github.com/ruby/docker-images/blob/7589c4dad2d112bcfc255324363c91616741261a/install_ruby.sh#L99).

@moznion
Copy link
Author

moznion commented Nov 23, 2025

Oops sorry, this seems like duplicated by #509 but is it still progress?

@Earlopain
Copy link
Contributor

Yeah, I'm still on it. I want to wait until the first release candiate to see how the developers feel about the status of zjit. I don't really want to expose here it if they don't think it's ready yet.

For now the release notes have this to say:

As of Ruby 4.0.0-preview1, ZJIT is not yet ready for speeding up most benchmarks. Please refrain from evaluating ZJIT just yet. Stay tuned for the Ruby 4.0 release.

@tianon
Copy link
Member

tianon commented Nov 24, 2025

Thank you (both) for the contribution! I'm indeed going to close in favor of #509 for tracking this, since @Earlopain has been really on top of it and waiting seems sane to me too ❤️

@tianon tianon closed this Nov 24, 2025
@moznion
Copy link
Author

moznion commented Nov 25, 2025

Thank you for the information. I understand the current situation.
The motivation behind this pull request is that we want to try ZJIT in a production (or production-like) environment. In my opinion, it would be more useful if this Docker repository provided images with ZJIT enabled for that purpose.

@moznion
Copy link
Author

moznion commented Nov 25, 2025

Anyway, I appreciate your support and maintenance of this repository ❤️

@moznion moznion deleted the enable_zjit branch November 25, 2025 01:11
@tianon
Copy link
Member

tianon commented Nov 25, 2025

With the important echoed caveat that upstream doesn't officially recommend it for production yet, you should be able to create a build directly from #509 with something like this:

docker build 'https://github.com/docker-library/ruby.git#refs/pull/509/merge:4.0-rc/trixie'
(adjusting for taste, especially adding --tag)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants