Skip to content

stefanschoeberl/MiniJava-Compiler

Repository files navigation

MiniJava-Compiler for WebAssembly - Master's Thesis Project

A compiler for a subset of Java (MiniJava) implemented in Kotlin with the support of ANTLR.

Requirements

Quick Start (Hello World)

Step 1: Build the compiler

$ ./gradlew compiler:allInOneJar

Step 2: Compile the demo.minijava file

$ java -jar compiler/build/libs/compiler-all-in-one-1.0.jar stdlib/core demo.minijava -o wasm-output

Step 3: Run it

$ ./run ./wasm-output

Step 4: Experiment with MiniJava in the demo.minijava file!

Node.js demo application

Step 1: Build the application

$ ./gradlew demo-nodejs:build

Step 2: Run it

$ cd demo-nodejs
$ npm run start

Browser demo application

Step 1: Build the application

$ ./gradlew demo-browser:build

Step 2: Run it

$ cd demo-browser
$ docker-compose up

Navigate to http://localhost:8080