1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
Alan Wu f90549cd38 Rust YJIT
In December 2021, we opened an [issue] to solicit feedback regarding the
porting of the YJIT codebase from C99 to Rust. There were some
reservations, but this project was given the go ahead by Ruby core
developers and Matz. Since then, we have successfully completed the port
of YJIT to Rust.

The new Rust version of YJIT has reached parity with the C version, in
that it passes all the CRuby tests, is able to run all of the YJIT
benchmarks, and performs similarly to the C version (because it works
the same way and largely generates the same machine code). We've even
incorporated some design improvements, such as a more fine-grained
constant invalidation mechanism which we expect will make a big
difference in Ruby on Rails applications.

Because we want to be careful, YJIT is guarded behind a configure
option:

```shell
./configure --enable-yjit # Build YJIT in release mode
./configure --enable-yjit=dev # Build YJIT in dev/debug mode
```

By default, YJIT does not get compiled and cargo/rustc is not required.
If YJIT is built in dev mode, then `cargo` is used to fetch development
dependencies, but when building in release, `cargo` is not required,
only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer.

The YJIT command-line options remain mostly unchanged, and more details
about the build process are documented in `doc/yjit/yjit.md`.

The CI tests have been updated and do not take any more resources than
before.

The development history of the Rust port is available at the following
commit for interested parties:
1fd9573d8b

Our hope is that Rust YJIT will be compiled and included as a part of
system packages and compiled binaries of the Ruby 3.2 release. We do not
anticipate any major problems as Rust is well supported on every
platform which YJIT supports, but to make sure that this process works
smoothly, we would like to reach out to those who take care of building
systems packages before the 3.2 release is shipped and resolve any
issues that may come up.

[issue]: https://bugs.ruby-lang.org/issues/18481

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com>
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2022-04-27 11:00:22 -04:00
..
-ext- Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
base64
benchmark
bigdecimal [ruby/bigdecimal] Fix the maximum precision of the quotient 2022-01-24 10:56:30 +09:00
cgi
coverage
csv
date Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
did_you_mean
digest
drb
dtrace Use omit instead of skip without the default gems tests 2022-01-11 21:17:59 +09:00
erb [ruby/erb] Revert "Remove safe_level and further positional arguments (https://github.com/ruby/erb/pull/7)" 2022-01-17 12:39:17 -08:00
error_highlight [ruby/error_highlight] Add a test to check if it is robust against a spoofed filename 2022-01-04 23:18:37 +09:00
etc
excludes Skip three tests on FreeBSD 13 2022-03-08 16:06:37 +09:00
fiber rb_fiber_terminate must not return [Bug #18497] 2022-01-19 19:57:16 +09:00
fiddle
fileutils Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
fixtures/fake_sorted_set_gem
io test/io/console/test_io_console.rb: parens needed 2022-03-08 17:40:02 +09:00
irb
json
lib Fix test_rubyoptions for MinGW (#5363) 2021-12-27 22:22:09 -08:00
logger [ruby/logger] Fix log rotation inter-process lock failed. 2022-01-27 12:33:06 +09:00
mkmf Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
monitor
net [ruby/net-http] Feature detect to make net/http usable with JRuby 2022-04-20 13:01:08 +09:00
nkf
objspace Refactor test_dump_all to make assertions about the contents of the dumped hash 2022-03-29 08:21:10 -07:00
open-uri
openssl
optparse Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
ostruct [ruby/ostruct] Fix class and method as attribute names 2022-03-07 20:08:22 +09:00
pathname [ruby/pathname] Implement Pathname#lutime 2022-04-21 17:10:19 +09:00
psych [ruby/psych] Add strict_integer option to parse numbers with commas as strings 2022-01-22 10:00:51 +09:00
racc
rdoc [ruby/rdoc] Apply matching word pairs to underscore-methods 2022-04-14 16:37:14 +09:00
readline
reline [ruby/reline] Fix support for emacs-ctlx and emacs-meta keymaps 2022-02-22 18:52:52 +09:00
resolv [ruby/resolv] Use omit instead of skip for test-unit 2022-01-12 10:49:58 +09:00
rinda [ruby/rinda] Use omit instead of skip for test-unit 2022-01-12 10:59:21 +09:00
ripper
ruby Rust YJIT 2022-04-27 11:00:22 -04:00
rubygems Github -> GitHub 2022-04-19 08:31:41 +09:00
socket Use omit instead of skip: test/socket/**/*.rb 2021-12-28 20:29:54 +09:00
stringio
strscan
syslog
uri Use https for wss test 2022-04-22 12:11:36 +09:00
win32ole [ruby/win32ole] Use omit() for skip() 2022-01-12 10:50:43 +09:00
yaml
zlib [ruby/zlib] Mask checksums to lower 32bits 2022-04-02 17:01:33 +09:00
runner.rb
test_abbrev.rb
test_delegate.rb
test_extlibs.rb
test_find.rb [ruby/find] Use omit instead of skip for test-unit 2022-01-11 21:40:51 +09:00
test_forwardable.rb
test_getoptlong.rb
test_ipaddr.rb [ruby/ipaddr] Fix exception calling to_range' after freeze' 2022-02-10 17:18:05 +09:00
test_mutex_m.rb
test_observer.rb
test_open3.rb [ruby/open3] Use omit instead of skip for test-unit 2022-01-12 10:52:09 +09:00
test_pp.rb
test_prettyprint.rb
test_pstore.rb
test_pty.rb Use omit instead of skip without the default gems tests 2022-01-11 21:17:59 +09:00
test_rbconfig.rb
test_securerandom.rb
test_set.rb Make Set a builtin feature [Feature #16989] 2022-02-18 11:56:24 +09:00
test_shellwords.rb
test_singleton.rb
test_sorted_set.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
test_tmpdir.rb [ruby/tmpdir] Use omit instead of skip for test-unit 2022-01-11 21:50:53 +09:00
test_trick.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb