Unverified Commit eaf953df authored by Stefan Brunecker's avatar Stefan Brunecker Committed by GitHub
Browse files

Update README.md

parent f1966ef4
......@@ -8,6 +8,49 @@ This project compiles EmbeddedMontiArc models to WebAssembly.
Check out our project page: http://embeddedmontiarc.com/
## Getting started
Download the latest release from [https://github.com/EmbeddedMontiArc/EMAM2Wasm/releases](https://github.com/EmbeddedMontiArc/EMAM2Wasm/releases).
Extract the archive and run
``` bash
$ setup.bat
```
To compile a model, use
``` bash
$ java -jar emam2wasm [options]
```
## Command Line Options
This project uses Spring to inject configuration parameters. Each parameter has to be provided in the form `--<option>=<value>`.
### Required:
Option | Explaination
-------- | -------------
model-path | Path to the base model directory
model | Full model name (package + component name)
spring.profiles.active | Set the active spring profiles. Available are <ul><li>`compiler`: Compile EMAM to WebAssembly</li><li>`setup`: Download and install emscripten, download Armadillo</li></ul>
### Optional:
Option | Explaination | Default value
-------- | ------------- | ---------------
target | Path to which all files will be generated. `target` has precedence over `cpp-dir`, `wasm-dir` and `web-dir` |
cpp-dir | Path to which all C++ files will be generated | Current directory
wasm-dir | Path to which all WebAssembly files will be generated | Current directory
web-dir | Path to which all Javascript and HTML files will be generated | Current directory
include | List of paths that will be passed to emscripten as `-I"<path>"` | empty
library | List of paths that will be passed to emscripten as `-L"<path>"` | empty
options | List of options of the form `<option>=[0\|1]` | WASM=1, LINKABLE=1, EXPORT_ALL=1, ALLOW_MEMORY_GROWTH=1
flag | List of flags that will be passed to emscripten as `-<flag>` | std=c++11
bind | Either `true` or `false`. If `true`, `--bind` is passed to emscripten | `true`
algebraic-optimization | Either `true` or `false`. Sets the `useAlgebraicOptimizations` flag in [EMAM2Cpp](https://github.com/EmbeddedMontiArc/EMAM2Cpp) | `true`
generate-tests | Either `true` or `false`. Sets the `generateTests` flag in [EMAM2Cpp](https://github.com/EmbeddedMontiArc/EMAM2Cpp) | `true`
emscripten.execute.command | The command that needs to be executed to invoke emscripten | By default, emam2wasm will look for the *.emscripten* configuration file and use the path that is defined there
emscripten.execute.binary.name | The name of the emscripten binary to use | *emcc.bat*
[travis-image]: https://img.shields.io/travis/EmbeddedMontiArc/EMAM2Wasm.svg?branch=master&label=linux
[travis-url]: https://travis-ci.org/EmbeddedMontiArc/EMAM2Wasm
[appveyor-image]: https://img.shields.io/appveyor/ci/sbrunecker/emam2wasm/master.svg?label=windows
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment