2020-05-03 14:08:24 +00:00
# RLN
2020-04-23 17:55:24 +00:00
2020-06-07 15:48:04 +00:00
This is the development repo of rate limit nullifier zkSNARK circuits.
2020-06-13 20:03:29 +00:00
For details, see work in progress document [here ](https://hackmd.io/tMTLMYmTR5eynw2lwK9n1w?view )
2020-06-07 15:48:04 +00:00
2020-06-13 19:39:33 +00:00
## Test
2020-06-07 15:48:04 +00:00
2020-06-13 19:39:33 +00:00
```
cargo test --release --features multicore rln_32 -- --nocapture
```
2020-06-07 15:48:04 +00:00
2020-06-13 20:03:29 +00:00
## Generate Test Keys
2020-06-13 19:39:33 +00:00
```
cargo run --release --example export_test_keys
```
## Wasm Support
2021-10-15 09:33:27 +00:00
### Build
2020-11-02 10:23:42 +00:00
```
2020-11-02 15:43:56 +00:00
wasm-pack build --release --target=nodejs --scope=rln --out-name=$PACKAGE --out-dir=$PACKAGE_DIR -- --features wasm
2020-11-02 10:23:42 +00:00
```
### Test
2020-06-13 19:39:33 +00:00
With wasm-pack:
2020-06-07 15:48:04 +00:00
```
wasm-pack test --release --node -- --features wasm
```
2020-06-13 19:39:33 +00:00
With cargo:
2020-06-13 20:03:29 +00:00
Follow the steps [here ](https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/usage.html#appendix-using-wasm-bindgen-test-without-wasm-pack ) before running the test, then run:
2020-06-13 19:39:33 +00:00
```
2020-06-13 19:44:22 +00:00
cargo test --release --target wasm32-unknown-unknown --features wasm
2020-06-13 19:39:33 +00:00
```