ruby/doc/rjit/rjit.md

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

46 строки
1.2 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-10 22:27:04 +03:00
## configure
### --enable-rjit
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.
### --enable-rjit=dev
2023-04-28 00:27:51 +03:00
It enables `--rjit-dump-disasm` if libcapstone is available.
2023-03-10 22:27:04 +03:00
## make
### rjit-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-10 22:27:04 +03:00
## ruby
### --rjit-stats
This prints RJIT stats at exit.
2023-03-10 22:27:04 +03:00
### --rjit-dump-disasm
This dumps all JIT code. You need to install libcapstone before configure and use `--enable-rjit=dev` on configure.
2023-03-10 22:27:04 +03:00
* Ubuntu: `sudo apt-get install -y libcapstone-dev`
* macOS: `brew install capstone`