TruffleRuby Runtime Configurations
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.
Dependencies
- make, gcc and g++ for building C and C++ extensions
- libssl for the
openssl
C extension - libyaml for the
psych
C extension - zlib for the
zlib
C extension
Without 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.
Migration from MRI
TruffleRuby should in most cases work as a drop-in replacement for MRI, but you should read about our compatibility.
Migration from JRuby
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.
Mailing List
Announcements about GraalVM, including TruffleRuby, are made on the graal-dev mailing list.
Authors
The main authors of TruffleRuby ordered by first contribution are: Chris Seaton, Benoit Daloze, Kevin Menard, Petr Chalupa, Brandon Fish, Duncan MacGregor, Christian Wirth, Rafael França, Alan Wu, Nicolas Laurent, Carol Chen, Nikolay Sverchkov, Lillian Zhang, Tom Stuart, and Maple Ong.
Security
See SECURITY for how to report security vulnerabilities to Oracle. For known vulnerabilities in Ruby, please refer to the known-cves file.
Attribution
TruffleRuby includes infrastructure code from JRuby (e.g. parser, JCodings, Joni), core library code from the Rubinius project, as well as code from the standard implementation of Ruby, MRI.