Programming language for distributed systems & p2p
Go to file
2022-10-09 18:38:35 +04:00
.github/workflows chore: Small E2E tuning (#557) 2022-09-14 17:36:16 +03:00
.vscode Add support for the new features of JS SDK API (#251) 2021-09-08 13:16:59 +03:00
aqua-src LNG-86 Stream canonicalization (#553) 2022-09-30 19:06:55 +03:00
backend Switch to compiler support v4 in FluenceJS (#566) 2022-10-09 16:45:10 +03:00
cli Run builtin services directly from aqua run (#552) 2022-08-30 17:45:25 +03:00
compiler/src LNG-86 Stream canonicalization (#553) 2022-09-30 19:06:55 +03:00
io/src/main/scala/aqua Errors to std.err (#513) 2022-05-19 13:26:10 +03:00
language-server-api/src/main/scala/aqua/lsp DXJ-82 DXJ-42 Go-to definition for data structs and imports in VSCode extension (#541) 2022-07-26 16:58:28 +03:00
language-server-npm Update scala and libs versions (#544) 2022-08-01 22:20:45 +03:00
linker/src Module and Use expressions (#245) 2021-08-20 18:03:47 +03:00
model LNG-88 Canonicalize streams in service calls and if statements (#565) 2022-10-06 15:42:11 +03:00
npm chore: bump fluence-js version to v0.26.1 (#567) 2022-10-09 18:38:35 +04:00
parser/src LNG-86 Stream canonicalization (#553) 2022-09-30 19:06:55 +03:00
project Use global node_modules path to find aqua dependencies (#450) 2022-03-09 18:54:28 +03:00
semantics/src LNG-86 Stream canonicalization (#553) 2022-09-30 19:06:55 +03:00
types/src LNG-86 Stream canonicalization (#553) 2022-09-30 19:06:55 +03:00
.gitignore CLI: Implement create_keypair (#375) 2021-11-26 14:05:24 +03:00
.jvmopts Upper cased constants (#260) 2021-09-07 11:09:48 +03:00
.scalafmt.conf VarModel -> VarRaw in collect functions (#405) 2022-01-20 07:08:26 +03:00
build.sbt chore: bump fluence-js version to v0.26.1 (#567) 2022-10-09 18:38:35 +04:00
README.md Readme updates (#295) 2021-09-10 17:36:21 +03:00

Aqua

release npm

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.

Please refer to Aqua Book to learn more about Aqua language.

Install and run

The easiest way to use Aqua is to download the latest build from npm: @fluencelabs/aqua.

npm i -g @fluencelabs/aqua
aqua --input src/aqua --output src/generated

Input directory should contain files with .aqua scripts.

Build from sources

If you want to build Aqua compiler from the sourcecode, you need Scala'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:

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:

java -jar aqua-%version_number%.jar -i path/to/input/dir -o path/to/output/dir

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
  • model/transform - optimizations and transfromations, converting model to the result, ready to be rendered
  • model/test-kit - tests and test helpers for the model and transformations
  • 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

References