Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to convert Java bytecode to Webassembly using CheerpJ compiler

I’m not sure how can I compile my Java code to wasm using CheerpJ compiler.

In the documentation all I can find is how to compile it to Javascript file, but it should be able to compile it to wasm as well. Can anyone help me with the command.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

CheerpJ lead developer here. CheerpJ does uses WebAssembly internally for parts of the Java runtime. It does not use WebAssembly as a compilation target for Java bytecode.

The reason for this is that WebAssembly is just not a good target for Java, while JavaScript is. CheerpJ generates very efficient JavaScript by using type hints and making sure all objects have a well-known structure that never changes.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading