2021-04-14 15:00:51 +00:00
|
|
|
## Aqua
|
|
|
|
|
|
|
|
Aqua is a new-gen language for distributed systems.
|
|
|
|
|
|
|
|
Aqua programs are executed on many peers, sequentially
|
|
|
|
or in parallel, forming a single-use coordination network.
|
|
|
|
|
|
|
|
Aqua's runtime is heterogeneous: it includes browsers, servers, devices, all involved in solving a single task.
|
|
|
|
Therefore, Aqua scripts are compiled into several targets at once, with AIR and Typescript as a default.
|
|
|
|
|
2021-09-08 10:37:59 +00:00
|
|
|
## aqua
|
2021-04-14 15:00:51 +00:00
|
|
|
|
2021-09-08 10:37:59 +00:00
|
|
|
The package contains a convenience `aqua` wrapper for usage in npm-based projects.
|
2021-04-14 15:00:51 +00:00
|
|
|
|
|
|
|
### usage
|
|
|
|
|
|
|
|
Get the latest package
|
|
|
|
|
|
|
|
```bash
|
2021-09-08 10:37:59 +00:00
|
|
|
npm i --save-dev @fluencelabs/aqua
|
2021-04-14 15:00:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Create a directory for the source files: `.aqua` and for compiled files: `.ts`
|
|
|
|
|
|
|
|
```
|
2021-09-10 14:36:21 +00:00
|
|
|
mkdir src/aqua src/compiled
|
2021-04-14 15:00:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
To compile files run:
|
|
|
|
|
|
|
|
```bash
|
2021-09-08 10:37:59 +00:00
|
|
|
aqua -i ./src/aqua/ -o ./src/compiled
|
2021-04-14 15:00:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Alternatively the compilation script can be put into scripts section of `package.json`
|
|
|
|
|
|
|
|
```
|
|
|
|
...
|
|
|
|
"scripts": {
|
|
|
|
...
|
|
|
|
"compile": "aqua -i ./src/aqua/ -o ./src/compiled"
|
|
|
|
},
|
|
|
|
...
|
|
|
|
```
|
|
|
|
|
|
|
|
and can be started with
|
|
|
|
|
|
|
|
```
|
|
|
|
npm run compile
|
|
|
|
```
|
|
|
|
|
|
|
|
### references
|
|
|
|
|
|
|
|
- For the list of compiler options see: https://github.com/fluencelabs/aqua
|
|
|
|
- To get started writing aqua see: https://github.com/fluencelabs/aqua-playground
|
|
|
|
|