Skip to content

TruffleRuby - GraalVM Community Edition 1.0 RC7

Pre-release
Pre-release
Compare
Choose a tag to compare
@ansalond ansalond released this 03 Oct 11:05
· 17523 commits to master since this release

TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.4.4.

TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.

TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.

The Ruby language components can be installed in GraalVM using the gu utility.

Release Notes

New features:

  • Useful inspect strings have been added for more foreign objects.
  • The C extension API now defines a preprocessor macro TRUFFLERUBY.
  • Added the rbconfig/sizeof native extension for better MRI compatibility.
  • Support for pg 1.1. The extension now compiles successfully, but
    may still have issues with some datatypes.

Bug fixes:

  • readline can now be interrupted by the interrupt signal (Ctrl+C). This fixes
    Ctrl+C to work in IRB.
  • Better compatibility with C extensions due to a new "managed struct" type.
  • Fixed compilation warnings which produced confusing messages for end users (#1422).
  • Improved compatibility with Truffle polyglot STDIO.
  • Fixed version check preventing TruffleRuby from working with Bundler 2.0 and
    later (#1413).
  • Fixed problem with Kernel.public_send not tracking its caller properly (#1425).
  • rb_thread_call_without_gvl() no longer holds the C-extensions lock.
  • Fixed caller_locations when called inside method_added.
  • Fixed mon_initialize when called inside initialize_copy (#1428).
  • Mutex correctly raises a TypeError when trying to serialize with Marshal.dump.

Performance:

  • Reduced memory footprint for private/internal AST nodes.
  • Increased the number of cases in which string equality checks will become
    compile-time constants.
  • Major performance improvement for exceptional paths where the rescue body
    does not access the exception object (e.g., x.size rescue 0).

Changes:

  • Many clean-ups to our internal patching mechanism used to make some native
    extensions run on TruffleRuby.
  • Removed obsoleted patches for Bundler compatibility now that Bundler 1.16.5
    has built-in support for TruffleRuby.
  • Reimplemented exceptions and other APIs that can return a backtrace to use
    Truffle's lazy stacktraces API.