2022-09-20 12:22:46 +00:00
|
|
|
# RLN for WASM
|
|
|
|
This library is used in [waku-org/js-rln](https://github.com/waku-org/js-rln/)
|
|
|
|
|
|
|
|
## Building the library
|
2022-09-24 14:27:46 +00:00
|
|
|
1. Install `wasm-pack`
|
2022-09-20 12:22:46 +00:00
|
|
|
```
|
|
|
|
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
|
|
```
|
2022-09-24 14:27:46 +00:00
|
|
|
2. Install `cargo-make`
|
|
|
|
```
|
|
|
|
cargo install cargo-make
|
|
|
|
```
|
2022-09-20 12:22:46 +00:00
|
|
|
3. Compile zerokit for `wasm32-unknown-unknown`:
|
|
|
|
```
|
|
|
|
cd rln-wasm
|
2022-09-24 14:27:46 +00:00
|
|
|
cargo make build
|
2022-09-20 12:22:46 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Running tests
|
|
|
|
```
|
|
|
|
cd rln-wasm
|
2022-09-24 14:27:46 +00:00
|
|
|
cargo make test
|
|
|
|
```
|
|
|
|
|
|
|
|
## Publishing a npm package
|
|
|
|
```
|
|
|
|
cd rln-wasm
|
|
|
|
cargo make login
|
|
|
|
cargo make publish
|
2022-09-20 12:22:46 +00:00
|
|
|
```
|