mirkosertic / Bytecoder

Framework to interpret and transpile JVM bytecode to JavaScript, OpenCL or WebAssembly.
https://www.mirkosertic.de/blog/2017/06/compiling-bytecode-to-javascript/
Apache License 2.0
891 stars 59 forks source link
bytecode compiler decompiler java-bytecode javascript jvm-bytecode kotlin llvm llvm-frontend opencl transpiler webassembly

Bytecoder

Bytecoder is a Rich Domain Model for Java Bytecode and Framework to interpret and transpile it to other languages such as JavaScript, OpenCL or WebAssembly.

Current Build status: Build Workflow Maven Central

High Level Goals

Compiling strategies

The JVM Bytecode is parsed and transformed into an intermediate representation. This intermediate representation is passed thru optimizer stages and sent to a backend implementation for target code generation.

The JavaScript backend transforms the intermediate representation into JavaScript.

The WebAssembly backend transforms the intermediate representation into WebAssembly text and binary code.

The OpenCL backend is used to compile single algorithms into OpenCL and execute them on the GPU. This backend is designed to enhance existing programs running on the JVM to utilize the vast power of modern GPUs.

User Manual

The Bytecoder User Manual and a full set of example applications is available here.