A Brainf*ck implementation on top of the JVM, utilizing GraalVM and Truffel framework.
Brainf*ck is a turing complete esoteric programming language that is famous for its extreme minimalism. This project implements Brainf*ck language using Truffel framework for the GraalVM
This project works with GraalVM v20.0.0 version (or higher v20.x.x) which can be downloaded from here. Follow these instructions to install it. Make sure that $JAVA_HOME environment variable point to the Graal installation and $JAVA_HOME/bin in the $PATH.
Execute mvn clean package to build the project.
$ sh ./bf path/to/program.bf
Native binary generation is done with the native-image utility, which is not bundled by default with the Graal distribution. Follow these instructions to install it.
After installing, execute mvn clean package -P native which will create the binary in the ./modules/launcher/target directory.
- language module - contains the Brainf*ck language implementation
- launcher module - contains the command line launcher
Following resources was very helpful for this project.
- Writing a Language in Truffle by Cristian Esquivias
- Building a programming language on GraalVM by Maarten Mulders
- SimpleLanguage - A simple demonstration language built using Truffle for the GraalVM
- TruffleSqueak - A Squeak/Smalltalk implementation for the GraalVM
- Truffle BF