mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 00:04:10 -08:00
Fixes description of build process. Adds an advantage over GWT
This commit is contained in:
parent
56991af700
commit
59581d28d6
24
README.md
24
README.md
|
@ -17,7 +17,7 @@ But there is something more:
|
|||
How to use
|
||||
----------
|
||||
|
||||
There are some options of using TeaVM. One is the maven build. First, you write your code as if it were an
|
||||
There are several options of using TeaVM. One is the maven build. First, you write your code as if it were an
|
||||
ordinary Java project:
|
||||
|
||||
package org.teavm.samples;
|
||||
|
@ -28,21 +28,17 @@ ordinary Java project:
|
|||
}
|
||||
}
|
||||
|
||||
Second, you include the following dependency in your `pom.xml`:
|
||||
|
||||
<dependency>
|
||||
<groupId>org.teavm</groupId>
|
||||
<artifactId>teavm-classlib</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
Third, you add `teavm-maven-plugin` in your build configuration:
|
||||
Second, you include the following plugin in your `pom.xml` build section:
|
||||
|
||||
<plugin>
|
||||
<groupId>org.teavm</groupId>
|
||||
<artifactId>teavm-maven-plugin</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<dependency>
|
||||
<groupId>org.teavm</groupId>
|
||||
<artifactId>teavm-classlib</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-javascript</id>
|
||||
|
@ -63,6 +59,9 @@ Now you can execute `mvn clean package` and get the generated JavaScript files i
|
|||
Just open `target/javascript/main.html` page in your browser, open developer's console and press *Refresh* and
|
||||
see what happen.
|
||||
|
||||
There is [teavm-samples](https://github.com/konsoletyper/teavm/tree/master/teavm-samples) module,
|
||||
containing a complete buildable and runnable example.
|
||||
|
||||
Advantages over GWT
|
||||
-------------------
|
||||
|
||||
|
@ -77,6 +76,9 @@ To represent a source code, GWT uses abstract syntax trees (AST).
|
|||
TeaVM uses control flow graph (CFG) of methods. CFG are much easier to optimize,
|
||||
so TeaVM **applies aggressive optimizations** to you code to make it running faster.
|
||||
|
||||
TeaVM compiler is faster. And TeaVM does not produce permutations.
|
||||
So with TeaVM you have no permutation explosion problem.
|
||||
|
||||
Advantages over JavaScript
|
||||
--------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user