Rahul Ghangas d68dc1ad8e
fix: wasm tests and ci (#165)
* fix: unwrap values in test

* fix: rln-wasm tests weren't being run in ci

* chore: cargo fmt
2023-05-18 11:33:45 +05:30
..
2022-09-20 08:22:46 -04:00
2023-05-18 11:33:45 +05:30
2023-05-03 09:53:11 -04:00

RLN for WASM

This library is used in waku-org/js-rln

Building the library

  1. Install wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
  1. Install cargo-make
cargo install cargo-make

OR

make installdeps
  1. Compile zerokit for wasm32-unknown-unknown:
cd rln-wasm
cargo make build
  1. Compile a slimmer version of zerokit for wasm32-unknown-unknown:
cd rln-wasm
cargo make post-build

Running tests

cd rln-wasm
cargo make test

Publishing a npm package

cd rln-wasm
cargo make login
cargo make publish