This document describes the setup for developing Aqua.
Clone the repo:
git clone [email protected]:sovereign-labs/aqua-compiler.git
Install dependencies:
cd aqua-compiler
npm install
Then run it:
npm start
Or with live reload:
npm run start:dev
Build the parser:
npm run build-parse
Build TypeScript code:
npm run build
aqua test.aqua
Or:
npx ts-node src/cli.ts examples/test.aqua
aqua exec test.aqua
Or:
npx ts-node src/cli.ts exec examples/test.aqua
aqua
Or:
npx ts-node src/cli.ts
Or
npm run start:repl
Trying entering expressions at the REPL prompt:
txn Amount >= 1000;
15 + txn Amount >= 1000;
txn Amount <= arg 0;
txn Amount + arg0 > 1000 && arg1 > 30;
txn Receiver == addr ABC123;
"a string" == txn Something;
return 1+2;
npm run start:ast
npm test
Or
npm run test:watch
Make sure to have use Node.js v12.15.0 which is known to work with Nexe.
Use nvm
to install and swap between different versions of Node.js:
nvm install 12.15.0
nvm use 12.15.0
!! Build the TypeScript code:
npm run build
Build for each platform:
npm run build-macos
npm run build-linux
npm run build-win
Or
npm run build-all
NOTE: Linux and MacOS builds should be built on Linux.
The Aqua compiler is automatically deployed.
To deploy a new version simply tag the commit for the new release with the version number in the following form:
v0.0.5
Don't forget to add the v
to the tag, this is how the deployment pipeline knows the tag is a version (and not some other tag).
Now push tags:
git push --tags
The updated version will deploy automatically to npm and a GitHub release will be created with executables for each platform (provided the automated tests pass).