mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
75c7135e12
* feat(docs): README update * docs: README edited. Some work is still needed * fill missing parts in README --------- Co-authored-by: Dmitry Kurinskiy <dmitry@fluence.one> Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
41 lines
1.2 KiB
Markdown
41 lines
1.2 KiB
Markdown
# Installation of Aqua
|
|
|
|
The easiest way to use Aqua is to download the latest build from npm: [@fluencelabs/aqua](https://www.npmjs.com/package/@fluencelabs/aqua).
|
|
|
|
```bash
|
|
npm i -g @fluencelabs/aqua
|
|
aqua --input src/aqua --output src/generated
|
|
```
|
|
|
|
Input directory should contain files with `.aqua` scripts.
|
|
|
|
Other ways of building Aqua can be found in [INSTALL.md](./INSTALL.md).
|
|
|
|
## Build from sources
|
|
|
|
If you want to build Aqua compiler from the sourcecode, you need [Scala](https://www.scala-lang.org/)'s `sbt` installed.
|
|
|
|
Aqua compiler itself can be compiled to and distributed either as JavaScript or Java file.
|
|
|
|
### Build to JS
|
|
|
|
Run `sbt cliJS/fullLinkOpt` to build JavaScript file. You can find the compiled file in: `cli/.js/target/scala-%scala-version%/cli-opt`.
|
|
|
|
Then run it with `node`:
|
|
|
|
```bash
|
|
node aqua-%version_number%.js -i path/to/input/dir -o path/to/output/dir
|
|
```
|
|
|
|
Javascript build is the default for Aqua.
|
|
|
|
### Build to JVM
|
|
|
|
Run `sbt cli/assembly` to build JAR file. It is located in `cli/.jvm/target/scala-%scala-version%/`
|
|
|
|
It requires `java` to run Aqua compiler in `.jar` file from the command line:
|
|
|
|
```bash
|
|
java -jar aqua-%version_number%.jar -i path/to/input/dir -o path/to/output/dir
|
|
```
|