mirror of https://github.com/vacp2p/zerokit.git
Update documentation for building and testing (#120)
* chore: fix Makefile pre-build * chore: add Makefile command to install depenedncy cargo-make * chore: update all READMEs with instructions to install dependencies, build and test * chore: add target to fetch all submodules
This commit is contained in:
parent
48fa1b9b3d
commit
62018b4eba
17
Makefile
17
Makefile
|
@ -1,13 +1,20 @@
|
|||
.PHONY: all test clean
|
||||
.PHONY: all installdeps build test clean
|
||||
|
||||
all: .pre-build
|
||||
@cargo make build
|
||||
all: .pre-build build
|
||||
|
||||
.pre-build:
|
||||
ifndef $(cargo make --help)
|
||||
.fetch-submodules:
|
||||
@git submodule update --init --recursive
|
||||
|
||||
.pre-build: .fetch-submodules
|
||||
ifeq (, $(shell which cargo-make))
|
||||
@cargo install --force cargo-make
|
||||
endif
|
||||
|
||||
installdeps: .pre-build
|
||||
|
||||
build: .pre-build
|
||||
@cargo make build
|
||||
|
||||
test: .pre-build
|
||||
@cargo make test
|
||||
|
||||
|
|
12
README.md
12
README.md
|
@ -17,3 +17,15 @@ in Rust.
|
|||
- [RLN library](https://github.com/kilic/rln) written in Rust based on Bellman.
|
||||
|
||||
- [semaphore-rs](https://github.com/worldcoin/semaphore-rs) written in Rust based on ark-circom.
|
||||
|
||||
## Build and Test
|
||||
|
||||
To install missing dependencies, run the following commands from the root folder
|
||||
```bash
|
||||
make installdeps
|
||||
```
|
||||
To build and test all crates, run the following commands from the root folder
|
||||
```bash
|
||||
make build
|
||||
make test
|
||||
```
|
||||
|
|
|
@ -3,7 +3,15 @@
|
|||
Example wrapper around a basic Circom circuit to test Circom 2 integration
|
||||
through ark-circom and FFI.
|
||||
|
||||
# FFI
|
||||
## Build and Test
|
||||
|
||||
To build and test, run the following commands within the module folder
|
||||
```bash
|
||||
cargo make build
|
||||
cargo make test
|
||||
```
|
||||
|
||||
## FFI
|
||||
|
||||
To generate C or Nim bindings from Rust FFI, use `cbindgen` or `nbindgen`:
|
||||
|
||||
|
|
|
@ -2,3 +2,10 @@
|
|||
|
||||
This module is to provide APIs to manage, compute and verify [Private Settlement](https://rfc.vac.dev/spec/44/) zkSNARK proofs and primitives.
|
||||
|
||||
## Build and Test
|
||||
|
||||
To build and test, run the following commands within the module folder
|
||||
```bash
|
||||
cargo make build
|
||||
cargo make test
|
||||
```
|
||||
|
|
|
@ -10,6 +10,12 @@ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|||
```
|
||||
cargo install cargo-make
|
||||
```
|
||||
|
||||
OR
|
||||
|
||||
```
|
||||
make installdeps
|
||||
```
|
||||
3. Compile zerokit for `wasm32-unknown-unknown`:
|
||||
```
|
||||
cd rln-wasm
|
||||
|
|
|
@ -3,15 +3,21 @@
|
|||
This module provides APIs to manage, compute and verify [RLN](https://rfc.vac.dev/spec/32/) zkSNARK proofs and RLN primitives.
|
||||
|
||||
## Pre-requisites
|
||||
### Install
|
||||
### Install dependencies and clone repo
|
||||
|
||||
```sh
|
||||
make installdeps
|
||||
git clone https://github.com/vacp2p/zerokit.git
|
||||
cd zerokit/rln
|
||||
```
|
||||
Implemented tests can be executed by running within the module folder
|
||||
|
||||
`cargo test --release`
|
||||
### Build and Test
|
||||
|
||||
To build and test, run the following commands within the module folder
|
||||
```bash
|
||||
cargo make build
|
||||
cargo make test
|
||||
```
|
||||
|
||||
### Compile ZK circuits
|
||||
|
||||
|
|
|
@ -8,3 +8,11 @@ Goal is also to provide a basic FFI around protocol.rs, which is currently not
|
|||
in scope for that project.
|
||||
|
||||
See that project for more information.
|
||||
|
||||
## Build and Test
|
||||
|
||||
To build and test, run the following commands within the module folder
|
||||
```bash
|
||||
cargo make build
|
||||
cargo make test
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue