mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Alternatives added
This commit is contained in:
parent
4bf568f378
commit
f5928ab1d4
@ -21,7 +21,7 @@ JWebAssembly requires Java SE 8 or higher. It is tested with Java SE 8 on [travi
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Exporting functions
|
### Exporting functions
|
||||||
To export a function to make it accessible from JavaScript you need add the annotation org.webassembly.annotation.Export
|
To export a Java function to make it accessible from JavaScript you need add the annotation org.webassembly.annotation.Export
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import org.webassembly.annotation.Export;
|
import org.webassembly.annotation.Export;
|
||||||
@ -33,6 +33,9 @@ public static int add( int a, int b ) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Java Limits
|
### Java Limits
|
||||||
In version 1 of WebAssembly you can compile only:
|
In version 1 of WebAssembly you can only compile:
|
||||||
* static methods
|
* static methods
|
||||||
* use the data types int, long float and double
|
* use the data types int, long float and double
|
||||||
|
|
||||||
|
### Alternatives
|
||||||
|
* [TeaVM](https://github.com/konsoletyper/teavm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user