SimpleLanguage Documentation

repository·master·Indexed 20 days ago

https://github.com/graalvm/simplelanguage

A demonstration language implemented using the Truffle framework for GraalVM. It serves as a reference implementation and educational tool for developers learning how to build new languages, providing instructions for building and running the language on a standard JVM or as a Native Image using Maven.

Tokens
443
Snippets
5
Records
6
Agent score
21%

What's inside SimpleLanguage

  1. Overview of SimpleLanguage

    master
    SimpleLanguage is a demonstration language built using the Truffle framework for GraalVM. It is designed to serve as an educational resource for understanding how to implement a language using Truffle. The source code is heavily documented to explain the implementation details of a Truffle language.
  2. Build and run SimpleLanguage as a Native Image

    master

    To build a standalone native executable using GraalVM's native-image capabilities, use the -Pnative Maven profile. After the build completes, the native executable can be found in the standalone/target/ directory and run directly via ./standalone/target/slnative.

    mvn package -Pnative
    ./standalone/target/slnative
  3. Build and run SimpleLanguage on a JVM

    master

    To build the project for use on a standard JVM, use Maven to package the application. Once built, you can run the language using the ./sl script, which utilizes the JDK specified in your JAVA_HOME environment variable.

    mvn package
    ./sl