A compiler for a subset of Java (MiniJava) implemented in Kotlin with the support of ANTLR.
- JDK 8 or above
wat2wasm
- tested version: 1.0.12
- part of WABT
- should be locatable in your $PATH
- Download prebuilt WABT here
- Docker
- tested version: 19.03.8
- Docker Installation Guide
- Docker Compose
- tested version: 1.25.5
- Docker Compose Installation Guide
- Node.js
- tested version: 12.16.3
- Download Node.js here
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!
Step 1: Build the application
$ ./gradlew demo-nodejs:build
Step 2: Run it
$ cd demo-nodejs
$ npm run start
Step 1: Build the application
$ ./gradlew demo-browser:build
Step 2: Run it
$ cd demo-browser
$ docker-compose up
Navigate to http://localhost:8080