3 Commits

Author SHA1 Message Date
Aiden Fox Ivey
f75e1cb362 ZJIT: Move jit.rs to ruby.rs and create a shared crate jit
* ruby.rs should hold the main entrypoint to YJIT and ZJIT
* The crate jit will hold code shared between them
2025-09-11 21:51:47 -07:00
Max Bernstein
e49c29ed75
ZJIT: Migrate to insta
Migrate from expect-test to insta snapshot testing library. While expect-test
is very small and has a limited surface, it does not handle nextest well; it
while doing inline snapshot updates, it races other test processes to update
the file, leading to frequent "Failed to process macro invocation" errors.

insta handles this by doing batches; it writes to temporary files which can
then be committed in a batch using `cargo insta review` or
`INSTA_UPDATE=always`.
2025-08-25 20:16:34 +00:00
Alan Wu
92b218fbc3 YJIT: ZJIT: Allow both JITs in the same build
This commit allows building YJIT and ZJIT simultaneously, a "combo
build". Previously, `./configure --enable-yjit --enable-zjit` failed. At
runtime, though, only one of the two can be enabled at a time.

Add a root Cargo workspace that contains both the yjit and zjit crate.
The common Rust build integration mechanisms are factored out into
defs/jit.mk.

Combo YJIT+ZJIT dev builds are supported; if either JIT uses
`--enable-*=dev`, both of them are built in dev mode.

The combo build requires Cargo, but building one JIT at a time with only
rustc in release build remains supported.
2025-05-15 00:39:03 +09:00