Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

graalvm/fastr-examples

Repository files navigation

GraalVM Examples

A collection of examples and use-cases for the GraalVM and FastR.

GraalVM is a universal virtual machine for running applications written in JavaScript, Python 3, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++.

FastR is a GraalVM based implementation of the R programming language, that provides significant improvements in the performance of R code, the embedding of the R execution engine into Java applications, and the ability to interface with other GraalVM and JVM languages including Python, Java, and Scala. FastR is also able to utilize the tooling support provided by the GraalVM ecosystem.

  • FastR Java UI is a Java based Swing desktop UI application showing visualization interactively generated an by R script.
  • rJava Benchmark shows how fast rJava can be on FastR (spoiler: orders of magnitude faster).
  • FastR Embedding show how to embed FastR into Java applications and pass Java objects to R scripts like if they were native R objects (e.g. R data frame).
  • Weather Predictor is an application that performs temperature prediction using Ruby, R and Node.js.
  • FastR Scalar is a simple, straightforward implementation of "Conway's Game of Life" written in R.
  • Node.js & FastR is a Node.js web server showing visualization computed and generated in FastR.

Setup

In order to run the examples, the latest GraalVM must be installed. It can be downloaded from the GraalVM homepage. The examples work on both the Community and Enterprise edition of GraalVM.

Once downloaded, extract the archive, set the GRAALVM_DIR environment variable to point to the graalvm directory, and install additional languages using ./install_components.sh.

Further information

License

All the examples are licensed under the GPLv3 license.

Troubleshooting

A typical problem is proxy set-up: verify that you have the http_proxy, https_proxy, and no_proxy environment variables set properly.