mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
JWebAssembly
JWebAssembly is a Java to WebAssembly Compiler. It uses Java class files as input.
Status of the project
Currently it is only a proof of concept.
Future Features
In the future there should be a Gradle plugin to easy integrate it in the build process and a Eclipse build command to see compiler errors in in the IDE.
Required Java Version
JWebAssembly requires Java SE 8 or higher. It is tested with Java SE 8 on travis-ci.org.
Usage
Exporting functions
To export a function to make it accessible from JavaScript you need add the annotation org.webassembly.annotation.Export
import org.webassembly.annotation.Export;
@Export
public static int add( int a, int b ) {
return a + b;
}
Java Limits
In version 1 of WebAssembly you can compile only:
- static methods
- use the data types int, long float and double
Description
Languages
Java
99.6%
JavaScript
0.4%