Giter Site home page Giter Site logo

aqua's Introduction

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

aqua's People

Contributors

alari avatar boneyard93501 avatar coder11 avatar diemyst avatar folex avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.