TruffleRuby is the GraalVM high-performance implementation
of the Ruby programming language built by
Oracle Labs.
Getting started
There are three ways to install TruffleRuby releases and nightly builds:
-
Via GraalVM, which includes support for
other languages such as JavaScript, R and Python and supports both the
native and JVM configurations.
Inside GraalVM will then be abin/ruby
command that runs TruffleRuby.
We recommend that you use a Ruby manager
to use TruffleRuby inside GraalVM. -
Via your Ruby manager/installer (RVM, rbenv,
chruby, ruby-build, ruby-install). This contains only TruffleRuby, in the
native configuration, making it a smaller
download. It is meant for users just wanting a Ruby implementation and already
using a Ruby manager. -
Using the standalone distribution
as a simple binary tarball. This distribution is also useful for
testing TruffleRuby in CI.
On TravisCI, you can simply use:language: ruby rvm: - truffleruby
And on GitHub Actions:
- uses: ruby/setup-ruby@v1 with: ruby-version: truffleruby
You can use gem
and bundle
to install Gems as normal.
Please report any issue you might find on GitHub.
Aim
TruffleRuby aims to:
- Run idiomatic Ruby code faster
- Run Ruby code in parallel
- Boot Ruby applications in less time
- Execute C extensions in a managed environment
- Add fast and low-overhead interoperability with languages like Java, JavaScript, Python and R
- Provide new tooling such as debuggers and monitoring that work across languages
- All while maintaining very high compatibility with the standard implementation of Ruby
TruffleRuby Configurations
There are two main configurations of TruffleRuby: Native and JVM which make different trade-offs.