mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
e3716f6f31
* Trying to make the compiler a pure function * Pure compiler WIP * Compiler should be working now * printlns * printlns * printlns * fix, delete printlns * more logs * fix import resolving, more tests * fix imports, add tests for imports resolving * fix test * correct paths to targets, correct output * refactoring, create directories to file if not exist * small changes * fix test * Tiny fixes WIP * Tiny fixes * Incrementing base version, as host_peer_id is added (fixes #218) * render error messages, WIP * small fix * get src for lexer error * wrap parser error * add list of errors * Handle file write errors accurately * Use show syntax * fix test * fix test * fix test * println Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
1.9 KiB
1.9 KiB
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.
Using Aqua
Please refer to Aqua Book to learn how to use Aqua.
Compiler CLI
To build the Aqua compiler, clone the repo & run sbt assembly
,
or simply download the latest JAR file from the releases page.
It requires java
to run Aqua compiler from the command line:
java -jar aqua-cli-%version_number%.jar -i path/to/input/dir -o path/to/output/dir
Input directory should contain files with aqua
scripts.
Repository structure
- types – data types, arrows, stream types definitions and variance
- parser - parser, takes source text and produces a source AST
- model - middle-end, internal representation of the code, optimizations and transfromations
- semantics - rules to convert source AST into the model
- linker - checks dependencies between modules, builds and combines an abstract dependencies tree
- backend - compilation backend interface
- compiler - compiler as a pure function made from linker, semantics and backend
- backend/air – generates AIR code from the middle-end model
- backend/ts - generates AIR code and Typescript wrappers for use with Fluence JS SDK
- cli - CLI interface