This commit is contained in:
Volker Berlin 2017-04-11 21:40:53 +02:00
parent 6632407c30
commit 4bf568f378

View File

@ -18,4 +18,21 @@ Required Java Version
----
JWebAssembly requires Java SE 8 or higher. It is tested with Java SE 8 on [travis-ci.org](https://travis-ci.org/i-net-software/jwebassembly).
## Usage
### Exporting functions
To export a function to make it accessible from JavaScript you need add the annotation org.webassembly.annotation.Export
```java
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