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

48 lines
835 B
Markdown
Raw Normal View History

2023-03-08 13:04:30 +00:00
# Nim bindings
This directory contains Nim bindings for the c-kzg-4844 library.
## Requirements
This bindings support Nim compiler version 1.2, 1.4, 1.6, and devel.
You also need to install dependencies:
```
nimble install stew
```
## Tests
2023-03-24 13:02:38 +00:00
Currently reference tests only support Nim compiler version 1.4, and 1.6 because of yaml library limitations.
But other tests that are not using yaml can be run by Nim 1.2 - devel.
2023-03-08 13:04:30 +00:00
Dependencies:
```
nimble install unittest2
nimble install yaml
```
Run the tests from folder `bindings\nim`:
```
nim test
```
2023-03-24 13:02:38 +00:00
Or from c-kzg-4844 root folder:
2023-03-08 13:04:30 +00:00
2023-03-24 13:02:38 +00:00
```
nimble test
```
2023-03-08 13:04:30 +00:00
2023-03-24 13:02:38 +00:00
## How to use this bindings in your project
2023-03-08 13:04:30 +00:00
2023-03-24 13:02:38 +00:00
Install via nimble:
```
nimble install https://github.com/ethereum/c-kzg-4844
```
2023-03-08 13:04:30 +00:00
2023-03-24 13:02:38 +00:00
Then import one of `kzg4844/kzg`, `kzg4844/kzg_abi`, or `kzg4844/kzg_ex` into your project.