Setting up the environment
A self-contained step-by-step tutorial of Keelung
In this tutorial, we'll show you how to set up the environment and write programs in Keelung.
The only Haskell tool you need for building Keelung programs is Stack.
For better development experience, it would be handy to have an Integrated Development Environment (IDE) or an editor with proper extensions installed.
- For an out-of-the-box experience, we recommend the VS Code editor with the vscode-haskell extension.
You can choose to install the compiler either through Docker or download the binaries directly.
docker run -i btqag/keelungc
If you are experiencing a long Docker image startup time (5~10 seconds), you may want to consider downloading native prebuilt binaries instead.
We have native binaries built for these platforms on releases. You can download the binary of the compiler for your platform and put it in a directory listed in your PATH environment variable.
Run the commands below to see if you have
keelungcinstalled on your machine.
You should see version numbers displayed in the terminal or command prompt. If not, you may need to check your installation or add the executable to your system's PATH environment variable.
docker run -i btqag/keelungc --version
To start coding with Keelung, please continue with either one of the sections below:
We've encountered some difficulties with the Docker images of the prover and verifier, a a new fixed version should be coming soon!
You don't have install the prover and the verifier now if you are just learning/trying out the Keelung language itself. You can still compile it into R1CS with the compiler above.
docker run -i btqag/aurora-prove
docker run -i btqag/aurora-verify
See Building a zkSNARK Application with Keelung: Merkle tree membership for an example of their usage. If you don't have the binaries installed but have Docker, the Keelung library should automatically detect that and run the Docker images.
Last modified 3mo ago