diff --git a/README.md b/README.md index e81d3fc..1113fde 100644 --- a/README.md +++ b/README.md @@ -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