ruby/doc/rjit/rjit.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 строки
1.1 KiB
Markdown
Исходник Обычный вид История

# RJIT: Ruby JIT
2023-03-07 10:15:30 +03:00
This document has some tips that might be useful when you work on RJIT.
## Project purpose
This project is for experimental purposes.
For production deployment, consider using YJIT instead.
## Supported platforms
2023-03-08 10:30:49 +03:00
The following platforms are assumed to work. `linux-x86_64` is tested on CI.
2023-03-08 10:30:49 +03:00
* OS: Linux, macOS, BSD
* Arch: x86\_64
2023-03-07 10:15:30 +03:00
## Developing RJIT
2022-12-22 22:14:58 +03:00
### Bindgen
2023-03-07 10:15:30 +03:00
If you see an "RJIT bindgen" GitHub Actions failure, please commit the `git diff` shown on the failed job.
2023-03-07 10:17:25 +03:00
For doing the same thing locally, run `make rjit-bindgen` after installing libclang.
2022-12-22 22:14:58 +03:00
macOS seems to have libclang by default. On Ubuntu, you can install it with `apt install libclang1`.
2023-03-08 10:30:49 +03:00
### --enable-rjit
2023-03-08 10:30:49 +03:00
On supported platforms, `--enable-rjit` is set by default. You usually don't need to specify this.
You may still manually pass `--enable-rjit` to try RJIT on unsupported platforms.
2023-03-08 10:30:49 +03:00
### --enable-rjit=dev
2023-03-08 10:30:49 +03:00
`--enable-rjit=dev` makes the interpreter slower, but enables the following two features:
2023-03-08 10:30:49 +03:00
* `--rjit-dump-disasm`: Dump all JIT code.
* `--rjit-stats`: Print RJIT stats.