This document exists as a brief introduction for how you can contribute to this
repository. It includes a guide to
the structure of the repository,
building and testing and
getting your code on main
.
If you are new to Go, there is a guide to getting started with the language that provides some basic resources for getting started.
If using Powershell, change font to
NSimSun
to be able to see all characters properly. This is taken from this stackoverflow answer.
This repository consists of two primary parts.
abstractor
: The abstractor, which is responsible for providing an abstract front-end to various ZK systems.extractor
: The extractor, which is responsible for providing the interface and tools that allow the generation of the Lean code from the circuit defined in Go.
You can build and test the go project as follows.
- Clone the repository into a location of your choice.
git clone https://github.com/reilabs/gnark-lean-extractor gnark-lean-demo
- Build the go circuit project using
go
(meaning that you will need to have that toolchain set up).
cd gnark-lean-abstractor
go build
- To run the tests, you can also use
go
.
go test
This repository works on a fork and pull request workflow, with code review and CI as an integral part of the process. This works as follows:
- If necessary, you fork the repository, but if you have access to do so please create a branch.
- You make your changes on that branch.
- Pull request that branch against main.
- The pull request will be reviewed and CI will be run on it.
- Once the reviewer(s) have accepted the code and CI has passed, the code will
be merged to
main
.
If you are new to working with Go, a great place to start is the official set of tutorials. They explain how to install and set the language up, as well as an interactive tour of how to use the language.
We recommend being familiar with the language and the go
command-line
interface to the build system and compiler before interacting with the Go
portion of this repository.