Add more build and test info

This commit is contained in:
Ben Edgington 2021-02-03 17:00:23 +00:00
parent 9f9c34e0ca
commit 6bf6e675b3
1 changed files with 19 additions and 4 deletions

View File

@ -5,8 +5,8 @@ The very beginnings of a simple implementation of [KZG commitments](https://dank
Initially, at least, this largely follows the [go-kzg](https://github.com/protolambda/go-kzg) implementation. Initially, at least, this largely follows the [go-kzg](https://github.com/protolambda/go-kzg) implementation.
Done so far: Done so far:
- Rough and ready FFT and inverse FFT over the finite field. - FFT and inverse FFT over the finite field.
- Ditto for FFTs over the G1 group - FFTs over the G1 group
## Installation ## Installation
@ -22,7 +22,21 @@ cp ../blst/libblast.a lib/
cp ../blst/bindings/*.h inc/ cp ../blst/bindings/*.h inc/
``` ```
There's no library to make here yet, but you can run the tests. ## Build
Build the `libckzg.a` library:
```
cd src
make lib
```
Build a debug version that aborts on error conditions and attempts to print some helpful info (file, line number, condition that failed):
```
cd src
make debuglib
```
## Run tests ## Run tests
@ -31,6 +45,8 @@ cd src
make test make test
``` ```
Unit tests for an individual file can be built and run with `make fft_fr_test` for example. Once a test runner such as *fft_fr_test* has been built, individual unit tests can be run with `./fft_fr_test <test-name>`.
Thanks to [Acutest](https://github.com/mity/acutest) for the unit test harness, which is used here under the MIT licence. Thanks to [Acutest](https://github.com/mity/acutest) for the unit test harness, which is used here under the MIT licence.
## Prerequisites ## Prerequisites
@ -38,4 +54,3 @@ Thanks to [Acutest](https://github.com/mity/acutest) for the unit test harness,
- Blst library (see above) - Blst library (see above)
- `clang` compiler. I'm using Clang 10.0.0. I'll likely add `gcc` options in future. - `clang` compiler. I'm using Clang 10.0.0. I'll likely add `gcc` options in future.
- I'm developing on Ubuntu 20.04. Will check portability later. - I'm developing on Ubuntu 20.04. Will check portability later.