CheerpJ Logo

Today we release CheerpJ 2.1, the latest major update to our Java to WebAssembly and JavaScript compiler.

About CheerpJ

CheerpJ is a solution to compile ahead of time and execute Java bytecode on the browser in WebAssembly and JavaScript. It comes with a full Java runtime environment, and with Java-JavaScript bidirectional interoperability. CheerpJ provides several browser-based system functions, including virtualized file systems, I/O, networking and audio.

Since release 2.0, CheerpJ supports WebAssembly in its runtime environment, for higher performance and smaller footprint. The full release notes for CheerpJ 2.0 can be found here.

What’s new

CheerpJ 2.1 is a maintenance release introducing several optimizations, bug fixes, and further extending the support for JavaScript interoperability.

New optimizations have been introduced in Java exception handling, which are now compiled to much more efficient JavaScript code. Native Java reflection calls — fully supported by CheerpJ — have also been optimized significantly, lowering the overhead in comparison with standard Java calls. We have continued reducing the build size of CheerpJ ahead-of-time JavaScript output.

Improvements to --stub-natives, a cheerpjfy.pyoption, allow CheerpJ to create stub JavaScript files for native methods. This allows to develop your own browser-based implementations of native methods in JavaScript/WebAssembly.

Several improvements to the robustness of the CheerpJ ahead-of-time compiler, as well as in the Java-JavaScript interoperability, have been introduced.

#java #javascript #html5 #webassembly #cheerpj #programming

CheerpJ 2.1 released — Java bytecode to WebAssembly and JavaScript
4.05 GEEK