Git Product home page Git Product logo

graalvm-truffle-tutorial's Introduction

GraalVM Truffle tutorial

This repository contains the code for a tutorial on the Truffle language implementation framework that I've written for my blog. It focuses on implementing a language I call EasyScript, which is a very simplified subset of JavaScript.

The repository is divided into multiple parts, each corresponding to a part of the blog article. Each part focuses on explaining a small set of Truffle capabilities, and builds on top of the previous parts by adding more features to the EasyScript language implementation.

Each part is a separate Gradle submodule, and so gets built when you build the top-level project.

Setup

To build and execute this project, you need a GraalVM installation on your local machine. The free Community Edition works fine if you don't have the paid Enterprise Edition. You can download it from here: https://github.com/graalvm/graalvm-ce-builds/releases. This repository uses Java 11 features, so make sure to download a version for Java 11.

Once you've downloaded the correct archive for your operating system and extracted it somewhere on your machine, you need to set the JAVA_HOME environment variable to point to the directory containing the uncompressed contents:

$ export JAVA_HOME=/path/to/extracted/archive

You can verify the installation works by executing the java command using JAVA_HOME:

$ $JAVA_HOME/bin/java -version

openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03)
OpenJDK 64-Bit Server VM GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03, mixed mode, sharing)

Building

Once you have GraalVM installed, you can build the project - it uses Gradle as its build system:

$ ./gradlew build

Table of contents

graalvm-truffle-tutorial's People

Contributors

skinny85 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.