Skip to content
/ montera Public

⚙️ Experimental JVM bytecode to WebAssembly compiler

License

Notifications You must be signed in to change notification settings

mrbbot/montera

Repository files navigation

⚙️ montera

Final year university project: a highly experimental JVM bytecode to WebAssembly compiler

⚠️ Do NOT use this for serious projects yet! It's currently missing support for key features like the Java standard library, garbage collection, strings, arrays and exceptions. For more complete alternatives, see:

Building

To generate a release build:

$ cargo build --release

Testing

To run unit and integration tests, make sure javac and dot executables are in the system PATH, then run:

$ cargo test

Benchmarking

To run benchmarks, make sure:

...then run:

$ cargo build --release  # Build project for benchmarking
$ export JAVA_HOME=/usr/local/Cellar/openjdk@11/11.0.12  # e.g. Java 11 installed using `brew` on macOS
$ cd benchmarks
$ mkdir -p data                    # Create data output directory

$ npm install                      # Install Node.js dependencies
$ npm run bench:build              # Run compilation time benchmark
$ npm run bench:runtime            # Run runtime performance benchmark
$ npm run bench:size               # Run download size benchmark

$ pip install -r requirements.txt  # Install Python dependencies (may want to create virtualenv)
$ npm run plot:build               # Plot compilation time benchmark results
$ npm run plot:runtime             # Plot runtime performance benchmark results
$ npm run plot:size                # Plot download size benchmark results

Acknowledgements

Bytecode structuring algorithms in src/function/structure are based on those described by Cristina Cifuentes in their Reverse Compilation Techniques PhD thesis.

The immediate dominance algorithm in src/graph/dominators.rs is based on that described by Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy in A Simple, Fast Dominance Algorithm.

About

⚙️ Experimental JVM bytecode to WebAssembly compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published