Skip to content

Conversation

@Earlopain
Copy link
Contributor

zjit is the next big thing and at least one character better than yjit.

It currently lags behind yjit in many areas but commiters expect it to be ready and on par with yjit by the time 3.5 actually releases.

https://bugs.ruby-lang.org/issues/21221

3.5-preview1 doesn't actually contain any code for ZJIT, so this will be a draft for a while until it actually makes sense.

@Earlopain
Copy link
Contributor Author

I'll double-check if this successfully compiles on all architectures once the next preview is out. It should support the same architectures as YJIT does.

@Earlopain Earlopain changed the title Build Ruby 3.5 with ZJIT Build Ruby 4.0 with ZJIT Nov 24, 2025
@Earlopain Earlopain force-pushed the zjit branch 2 times, most recently from 48b7879 to 166d357 Compare December 8, 2025 10:29
@Earlopain
Copy link
Contributor Author

Since ruby/ruby#15368 ZJIT is compiled in automatically as long as the rust version allows it. This is ready now

@Earlopain Earlopain marked this pull request as ready for review December 8, 2025 15:52
--enable-shared \
${rustArch:+--enable-yjit} \
{{ if env.version | IN("3.2", "3.3", "3.4") then "" else ( -}}
${rustArch:+--enable-zjit} \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace nit: 😅

Suggested change
${rustArch:+--enable-zjit} \
${rustArch:+--enable-zjit} \

More details at https://bugs.ruby-lang.org/issues/21221

ZJIT requires rust 1.85, so bump the version.
@tianon
Copy link
Member

tianon commented Dec 9, 2025

Thank you! ❤️

Let's do this 👀

@tianon tianon merged commit 84bfd8d into docker-library:master Dec 9, 2025
26 checks passed
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Dec 9, 2025
Changes:

- docker-library/ruby@84bfd8d: Merge pull request docker-library/ruby#509 from Earlopain/zjit
- docker-library/ruby@55e358c: Build Ruby 4.0 or greater with zjit
yosifkit pushed a commit to docker-library/official-images that referenced this pull request Dec 9, 2025
Changes:

- docker-library/ruby@84bfd8d: Merge pull request docker-library/ruby#509 from Earlopain/zjit
- docker-library/ruby@55e358c: Build Ruby 4.0 or greater with zjit

Co-authored-by: Docker Library Bot <[email protected]>
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.

2 participants