c-kzg-4844/bindings/java/README.md

41 lines
905 B
Markdown
Raw Normal View History

# Java binding
## Build shared library
### Prerequisites
2022-11-23 18:37:46 +00:00
* Build blst by running `make blst` in the [library source directory](../../src).
* Set `JAVA_HOME` environment variable to a JDK with an `include` folder containing a `jni.h` file.
2022-11-23 18:37:46 +00:00
### Build
```bash
2022-11-24 19:46:47 +00:00
make build
```
This will install the shared library in `src/main/resources/ethereum/ckzg4844/lib` with a folder
2023-10-18 18:31:55 +00:00
structure and name according your OS.
All variables which could be passed to the `make` command and the defaults can be found in
2022-12-06 15:03:58 +00:00
the [Makefile](./Makefile).
2022-11-24 17:16:15 +00:00
## Test
```bash
2022-11-24 17:16:15 +00:00
make test
```
## Benchmark
JMH is used for benchmarking.
See [CKZG4844JNIBenchmark.java](src/jmh/java/ethereum/ckzg4844/CKZG4844JNIBenchmark.java) for more
information.
```bash
make benchmark
```
## Library
The library which uses this binding and publishes a package to a public maven repo
is [jc-kzg-4844](https://github.com/ConsenSys/jc-kzg-4844).