A high performance implementation of the Ruby programming language, built on GraalVM.
3,221
stars
66,871
commits
Ruby
primary language
Sep 11, 2026
updated

TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.
TruffleRuby comes in two distributions:
You can install either of those:
VERSION by dev).Native Standalone:
$ rbenv install truffleruby-VERSION
$ ruby-build -d truffleruby-VERSION ~/.rubies
$ asdf install ruby truffleruby-VERSION
$ mise install ruby@truffleruby-VERSION
$ ruby-install truffleruby
$ rvm install truffleruby # or truffleruby-head
JVM Standalone:
$ rbenv install truffleruby+graalvm-VERSION
$ ruby-build -d truffleruby+graalvm-VERSION ~/.rubies
$ asdf install ruby truffleruby+graalvm-VERSION
$ mise install ruby@truffleruby+graalvm-VERSION
$ ruby-install truffleruby-graalvm
- uses: ruby/setup-ruby@v1
with:
ruby-version: truffleruby # or truffleruby-head or truffleruby+graalvm or truffleruby+graalvm-head
Via Docker. For the Native Standalone there are release & nightly images. For the JVM Standalone there are no Docker images yet, but you can easily download it and take inspiration from the Native Standalone Dockerfiles.
Manually, by following the documentation.
You can use gem and bundle to install gems, as usual.
Please report any issues you might find on GitHub.
TruffleRuby aims to:
There are two main runtime configurations of TruffleRuby, Native and JVM, which have different trade-offs.
| Configuration: | Native (--native, default) | JVM (--jvm) |
|---|---|---|
| Time to start TruffleRuby | about as fast as MRI startup | slower |
| Time to reach peak performance | faster | slower |
| Peak performance (also considering GC) | good | best |
| Java host interoperability | needs reflection configuration | just works |
To find out which runtime configuration is being used, run ruby --version on the command line,
or check the value of RUBY_DESCRIPTION or TruffleRuby.native? in Ruby code.
Runtime configurations are further detailed in Deploying TruffleRuby.
TruffleRuby is actively tested on the following systems:
Architectures:
x86_64): Supported on Linuxarm64): Supported on Linux and on macOSYou may find that TruffleRuby will not work if you severely restrict the
environment, for example, by unmounting system filesystems such as /dev/shm.
openssl C extensionzlib C extensionWithout these dependencies, many libraries including RubyGems will not work. TruffleRuby will try to print a nice error message if a dependency is missing, but this can only be done on a best effort basis.
You also need to set up a UTF-8 locale if not already done.
See the contributor workflow document if you wish to build TruffleRuby from source.
We recommend that people trying TruffleRuby on their gems and applications get in touch with us for any help they might need.
TruffleRuby runs Rails and is compatible with many gems, including C extensions. TruffleRuby is not 100% compatible with MRI 4.0 yet. Please report any compatibility issues you might find. TruffleRuby passes around 98% of ruby/spec, more than any other alternative Ruby implementation.
Regarding performance, TruffleRuby is by far
the fastest Ruby implementation on the yjit-bench benchmark suite which includes railsbench, etc.
To achieve this performance TruffleRuby needs a fair amount of warmup, as other advanced JIT compilers do.
If you find any performance issue, please see this guide.
TruffleRuby is released on its own schedule (based on features, important bug fixes, etc) and does not follow the GraalVM release schedule.
TruffleRuby version AB.C.D aims to be compatible with CRuby A.B.
For example TruffleRuby 34.0.0 aims to be compatible with CRuby 3.4.
This way TruffleRuby is able to follow semantic versioning.
The last release which used GraalVM/Truffle versioning is 25.0.0.
TruffleRuby is compatible with the GraalVM versions in the following table.
The Truffle version is fixed and is a dependency of the dev.truffleruby:truffleruby Maven artifact, so it cannot be chosen.
It is, however, relevant when doing interop with other Truffle languages, as they must use the same version of Truffle.
The minimum Java version for embedding TruffleRuby corresponds to the major of the minimum GraalVM version.
| TruffleRuby version | Truffle version | GraalVM versions |
|---|---|---|
| 40.0.0 | 25.2.4 | 25.2.x |
| 34.0.0 | 25.0.2 | 21.0.x, 25.0.x |
| 33.0.0 | 25.0.1 | 21.0.x, 25.0.x |
| 25.0.0 | 25.0.0 | 21.0.x, 25.0.x |
TruffleRuby should in most cases work as a drop-in replacement for MRI, but you should read about our compatibility.
For many use cases TruffleRuby should work as a drop-in replacement for JRuby. However, our approach to integration with Java is different to JRuby so you should read our migration guide.
Extensive user documentation is available in doc/user.
See our source code repository and contributor documentation to contribute to TruffleRuby. In particular, see the contributor workflow document for how to build and run TruffleRuby.
The best way to get in touch with us is to join the #truffleruby channel on
GraalVM Slack.
You can also mention or DM @truffleruby.dev on Bluesky.
Please report security vulnerabilities via the process outlined in SECURITY.md.
The main authors of TruffleRuby can be seen on GitHub.
See SECURITY.md for how to report security vulnerabilities. For known vulnerabilities in Ruby, please refer to the known-cves file.
TruffleRuby is copyright (c) 2013-2025 Oracle and/or its affiliates; 2026 TruffleRuby contributors, and is made available to you under the terms of any one of the following three licenses:
For further licensing information, see LICENCE, 3rd_party_licenses, and doc/legal/legal.
TruffleRuby includes infrastructure code from JRuby (e.g. JCodings, Joni), core library code from the Rubinius project, as well as code from the standard implementation of Ruby, MRI.
We are thankful for JetBrains providing the TruffleRuby core maintainers an All Products Pack subscription. We use IntelliJ and the Ruby plugin for a great integrated experience developing TruffleRuby.
(top 30 of 360)
Ruby
62.9%
C
22.6%
Java
12.3%
HTML
1.3%
A high performance implementation of the Ruby programming language, built on GraalVM.
3,221
stars
66,871
commits
Ruby
primary language
Sep 11, 2026
updated

TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.
TruffleRuby comes in two distributions:
You can install either of those:
VERSION by dev).Native Standalone:
$ rbenv install truffleruby-VERSION
$ ruby-build -d truffleruby-VERSION ~/.rubies
$ asdf install ruby truffleruby-VERSION
$ mise install ruby@truffleruby-VERSION
$ ruby-install truffleruby
$ rvm install truffleruby # or truffleruby-head
JVM Standalone:
$ rbenv install truffleruby+graalvm-VERSION
$ ruby-build -d truffleruby+graalvm-VERSION ~/.rubies
$ asdf install ruby truffleruby+graalvm-VERSION
$ mise install ruby@truffleruby+graalvm-VERSION
$ ruby-install truffleruby-graalvm
- uses: ruby/setup-ruby@v1
with:
ruby-version: truffleruby # or truffleruby-head or truffleruby+graalvm or truffleruby+graalvm-head
Via Docker. For the Native Standalone there are release & nightly images. For the JVM Standalone there are no Docker images yet, but you can easily download it and take inspiration from the Native Standalone Dockerfiles.
Manually, by following the documentation.
You can use gem and bundle to install gems, as usual.
Please report any issues you might find on GitHub.
TruffleRuby aims to:
There are two main runtime configurations of TruffleRuby, Native and JVM, which have different trade-offs.
| Configuration: | Native (--native, default) | JVM (--jvm) |
|---|---|---|
| Time to start TruffleRuby | about as fast as MRI startup | slower |
| Time to reach peak performance | faster | slower |
| Peak performance (also considering GC) | good | best |
| Java host interoperability | needs reflection configuration | just works |
To find out which runtime configuration is being used, run ruby --version on the command line,
or check the value of RUBY_DESCRIPTION or TruffleRuby.native? in Ruby code.
Runtime configurations are further detailed in Deploying TruffleRuby.
TruffleRuby is actively tested on the following systems:
Architectures:
x86_64): Supported on Linuxarm64): Supported on Linux and on macOSYou may find that TruffleRuby will not work if you severely restrict the
environment, for example, by unmounting system filesystems such as /dev/shm.
openssl C extensionzlib C extensionWithout these dependencies, many libraries including RubyGems will not work. TruffleRuby will try to print a nice error message if a dependency is missing, but this can only be done on a best effort basis.
You also need to set up a UTF-8 locale if not already done.
See the contributor workflow document if you wish to build TruffleRuby from source.
We recommend that people trying TruffleRuby on their gems and applications get in touch with us for any help they might need.
TruffleRuby runs Rails and is compatible with many gems, including C extensions. TruffleRuby is not 100% compatible with MRI 4.0 yet. Please report any compatibility issues you might find. TruffleRuby passes around 98% of ruby/spec, more than any other alternative Ruby implementation.
Regarding performance, TruffleRuby is by far
the fastest Ruby implementation on the yjit-bench benchmark suite which includes railsbench, etc.
To achieve this performance TruffleRuby needs a fair amount of warmup, as other advanced JIT compilers do.
If you find any performance issue, please see this guide.
TruffleRuby is released on its own schedule (based on features, important bug fixes, etc) and does not follow the GraalVM release schedule.
TruffleRuby version AB.C.D aims to be compatible with CRuby A.B.
For example TruffleRuby 34.0.0 aims to be compatible with CRuby 3.4.
This way TruffleRuby is able to follow semantic versioning.
The last release which used GraalVM/Truffle versioning is 25.0.0.
TruffleRuby is compatible with the GraalVM versions in the following table.
The Truffle version is fixed and is a dependency of the dev.truffleruby:truffleruby Maven artifact, so it cannot be chosen.
It is, however, relevant when doing interop with other Truffle languages, as they must use the same version of Truffle.
The minimum Java version for embedding TruffleRuby corresponds to the major of the minimum GraalVM version.
| TruffleRuby version | Truffle version | GraalVM versions |
|---|---|---|
| 40.0.0 | 25.2.4 | 25.2.x |
| 34.0.0 | 25.0.2 | 21.0.x, 25.0.x |
| 33.0.0 | 25.0.1 | 21.0.x, 25.0.x |
| 25.0.0 | 25.0.0 | 21.0.x, 25.0.x |
TruffleRuby should in most cases work as a drop-in replacement for MRI, but you should read about our compatibility.
For many use cases TruffleRuby should work as a drop-in replacement for JRuby. However, our approach to integration with Java is different to JRuby so you should read our migration guide.
Extensive user documentation is available in doc/user.
See our source code repository and contributor documentation to contribute to TruffleRuby. In particular, see the contributor workflow document for how to build and run TruffleRuby.
The best way to get in touch with us is to join the #truffleruby channel on
GraalVM Slack.
You can also mention or DM @truffleruby.dev on Bluesky.
Please report security vulnerabilities via the process outlined in SECURITY.md.
The main authors of TruffleRuby can be seen on GitHub.
See SECURITY.md for how to report security vulnerabilities. For known vulnerabilities in Ruby, please refer to the known-cves file.
TruffleRuby is copyright (c) 2013-2025 Oracle and/or its affiliates; 2026 TruffleRuby contributors, and is made available to you under the terms of any one of the following three licenses:
For further licensing information, see LICENCE, 3rd_party_licenses, and doc/legal/legal.
TruffleRuby includes infrastructure code from JRuby (e.g. JCodings, Joni), core library code from the Rubinius project, as well as code from the standard implementation of Ruby, MRI.
We are thankful for JetBrains providing the TruffleRuby core maintainers an All Products Pack subscription. We use IntelliJ and the Ruby plugin for a great integrated experience developing TruffleRuby.
(top 30 of 360)
Ruby
62.9%
C
22.6%
Java
12.3%
HTML
1.3%