Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby: Install rustc to enable yjit #994

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

runephilosof-abtion
Copy link

Ruby 3.2 will install with yjit enabled when rustc is installed.

Ruby 3.2 will install with `yjit` enabled when `rustc` is installed.
@runephilosof-abtion runephilosof-abtion requested a review from a team as a code owner June 4, 2024 08:10
@samruddhikhandale
Copy link
Member

Hi 👋

I understand that rustc is the Rust compiler which is needed to compile the Rust parts of YJIT. If rustc is installed on your system, Ruby 3.2 will be installed with YJIT enabled. If rustc is not installed, Ruby 3.2 will still install, but YJIT will be disabled.

As YJIT is still experimental, I'd hold off from adding rustc until we hear more requests for the same.
Let's keep this PR open for gathering more community feedback. Thanks!

@andrewn617
Copy link

andrewn617 commented Jun 5, 2024

Hi @samruddhikhandale I saw this issue an wanted to clarify a couple things.

YJIT is no longer experimental. In Rails 7.2, when running ruby 3.3, YJIT is enabled by default.

It's not exactly right to say that YJIT will be disabled when rustc is not installed - YJIT will not be installed at all, so it cannot be enabled. With rustc installed, it will give user the option to use YJIT if they choose (or if it is enabled by default for their rails/ruby version). So IMO it would be better to have rustc installed always, otherwise the user cannot benefit from yjit.

@eitsupi
Copy link
Contributor

eitsupi commented Jun 5, 2024

Just a question: I am not familiar with the Ruby source code, but I wonder if installing Rust in the OS package manager is really desirable here.
I mean, is Ruby's MSRV small enough and is a few years old Rustc like Debian stable provides enough?

If not, then perhaps we need to use rustup and configure it to install the latest rustc.

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.

4 participants