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 travis-ci build status:
- Ability to cross-compile JVM Bytecode to JavaScript, WebAssembly, OpenCL and other languages
- Primary compile targets are JavaScript and WebAssembly
- Supports Java 8, 11, 12 and 13
- Work well with Debugger Toolchains and SourceMaps
- Allow integration with other UI-Frameworks such as vue.js
- Backed by OpenJDK 12 as JRE Classlib
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.
| Demo |
|---|
| JBox2D Demo compiled from Java to JavaScript Relooper Codegen vs. Stackifier Codegen |
| JBox2D Demo compiled from Java to WebAssembly Relooper Codegen vs. Stackifier Codegen |
| JBox2D Demo compiled from Kotlin to JavaScript |
| JBox2D Demo compiled from Kotlin to WebAssembly |
| vue.js integration Demo compiled to WebAssembly |
| Lua4J Demo compiled to JavaScript |
| Lua4J Demo compiled to WebAssembly |
| GameComposer Physics Game Example compiled to WebAssembly. GameComposer is available here |
| GameComposer Physics Game Example compiled to JavaScript. GameComposer is available here |
The Bytecoder User Manual is available here.
