1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext
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
..
-test- Update ext/-test-/dln/empty/depend 2022-02-22 16:49:20 -05:00
bigdecimal [ruby/bigdecimal] Fix docs 2022-04-18 10:29:25 +09:00
cgi/escape [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
continuation [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
coverage Rust YJIT 2022-04-27 11:00:22 -04:00
date [ruby/date] Suppress declaration-after-statement warnings 2022-02-25 20:01:06 +09:00
digest [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
etc [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
fcntl [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
fiddle [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
io io.nonblock returns the block's value [ci skip] 2022-04-26 00:17:32 +09:00
json [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
monitor [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
nkf [ruby/nkf] Fix docs 2022-04-15 16:07:11 +09:00
objspace Rust YJIT 2022-04-27 11:00:22 -04:00
openssl Suppress warnings by OpenSSL 3 2022-03-16 20:49:00 +09:00
pathname [ruby/pathname] Implement Pathname#lutime 2022-04-21 17:10:19 +09:00
psych [ruby/psych] Update autoconf files bundled with yaml-2.5 2022-04-07 22:38:39 +09:00
pty Update PTY.spawn's document 2022-04-13 15:43:28 -04:00
racc/cparse [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
rbconfig/sizeof [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
readline [ruby/readline-ext] Removed the duplicated dependencies 2022-03-25 20:27:58 +09:00
ripper [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
rubyvm
socket Fix broken links of rdoc 2022-03-17 10:11:38 +09:00
stringio [ruby/stringio] bump up to 3.0.2.pre1 2022-04-16 06:34:31 +09:00
strscan [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
syslog [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
win32 Fix some typos by spell checker 2021-04-26 10:07:41 +09:00
win32ole [ruby/win32ole] Get rid of potential undefined behavior 2022-03-15 08:33:40 +09:00
zlib Removed mswin patch for zlib-1.2.11 2022-04-05 14:30:47 +09:00
.document
extmk.rb Move the target directory of bundled gems like as rubygems 2022-04-07 09:47:10 +09:00
Setup
Setup.atheos
Setup.nt