Clone wiki

FastR / Home


FastR is an implementation of the R Language in Java atop Truffle and Graal. Truffle is a framework for building self-optimizing AST interpreters. Graal is a dynamic compiler that is used to generate efficient machine code from partially evaluated Truffle ASTs.

FastR is an open-source effort of Purdue University, Johannes Kepler University Linz, and Oracle Labs.

Quick Start

System Requirements

FastR is developed and tested on Oracle Enterprise Linux 6.3 and Mac OS X Yosemite. It should work on other Linux variants. Building on Windows is currently not supported.

To build and run FastR, you need both JDK 1.8 and JDK 1.7 and a C/C++/Fortran compiler tool chain. You also need to use the mx build tool, which is used in all projects built around Graal. mx requires Python 2.7.

Getting FastR

  1. Clone mx: hg clone
  2. Append the mx directory to your PATH.

FastR requires Graal. Both projects are hosted in different repositories. To obtain both, use the multiple-repository support in mx, create a directory, e.g., r, that serves as the project root. We will refer to this as $FASTR_HOME in what follows.

$ mx sclone

After this, you should find three directories called fastr, jvmci and graal in the project root. Note that mx first downloaded fastr and then, using the information in the mx.fastr/imports file, downloaded a specific revision of Graal, which comes in two parts, jvmci and graal.

In addition to setting the JAVA_HOME environment variable to the location of your JDK 1.8 installation, you must also set the EXTRA_JAVA_HOMES environment variable to the location of your JDK 1.7 installation, as some sub-projects require Java 7 to build.

Building FastR

mx manages software in suites, which are normally one-to-one with a Mercurial repository. One suite is always designated as the primary suite, which in this case is fastr. To build a suite and the suites it depends on, the mx build command is used:

$ cd fastr
$ mx build

FastR shares some code with GnuR, for example, the default packages and the Blas library. Therefore, a version of GnuR (currently R-3.1.3), is downloaded and built as part of the first build.

When building for the first time, the build script will prompt you for a VM configuration to build. In general, choosing the server configuration is advised. For details, see README_GRAAL.txt in the graal subdirectory of the project root.

The first build will also download various required libraries, so there must be a network connection.

After building, running the FastR console is done with mx r or mx R. FastR supports the same command line arguments as R, so running an R script is done with mx R -f <file>. However, many of the command line options are not yet implemented.

IDE Usage

For IDE usage instructions, see the corresponding page on the Graal wiki. N.B. You should substitute $FASTR_HOME for $GRAAL when reading the instructions. I.e., $FASTR_HOME should be the workspace root.


FastR is a work in progress: please expect many rough edges and non-working language features. The tests in the project can give you an idea of what is currently supported.


We would like to grow the FastR open-source community to provide a free R implementation atop the Truffle/Graal stack. We encourage contributions, and invite interested developers to join in. Prospective contributors need to sign the Oracle Contributor Agreement (OCA).


Please direct questions and comments to the FastR mailing list.


  • Purdue University: Tomas Kalibera, Petr Maj, Jan Vitek, Prahlad Joshi
  • Johannes Kepler University Linz: Andreas Woess
  • Oracle Labs: Michael Haupt, Christian Humer, Mick Jordan, Lukas Stadler, Adam Welc, Christian Wirth, Thomas Wuerthinger
  • Interns/Postdocs: Gero Leinemann, Roman Katerinenko