Skip to content

Commit

Permalink
Prepare for crates.io publication (#193)
Browse files Browse the repository at this point in the history
* fix versions, use release ark-circom

* fix utils version

* fix lock file

* utils: renaming, use vacp2p_pmtree, description

* utils: fix  benches and tests

* fix lock and rkn files
  • Loading branch information
tyshko-rostyslav authored Jul 28, 2023
1 parent 9d4ed68 commit be2dccf
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 76 deletions.
116 changes: 59 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions rln/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "rln"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "APIs to manage, compute and verify zkSNARK proofs and RLN primitives"

[lib]
crate-type = ["rlib", "staticlib"]
Expand All @@ -21,34 +22,34 @@ ark-bn254 = { version = "=0.4.0" }
ark-groth16 = { version = "=0.4.0", features = ["parallel"], default-features = false }
ark-relations = { version = "=0.4.0", default-features = false, features = [ "std" ] }
ark-serialize = { version = "=0.4.1", default-features = false }
ark-circom = { version = "=0.1.0", git = "https://github.com/gakonst/ark-circom", default-features = false, features = ["circom-2"] }
ark-circom = { version = "=0.1.0", default-features = false, features = ["circom-2"] }

# WASM
wasmer = { version = "2.3.0", default-features = false }
wasmer = { version = "=2.3.0", default-features = false }

# error handling
color-eyre = "=0.6.2"
thiserror = "=1.0.38"
thiserror = "=1.0.39"

# utilities
cfg-if = "=1.0"
num-bigint = { version = "=0.4.3", default-features = false, features = ["rand"] }
num-traits = "0.2.11"
once_cell = "1.14.0"
num-traits = "=0.2.15"
once_cell = "=1.17.1"
rand = "=0.8.5"
rand_chacha = "=0.3.1"
tiny-keccak = { version = "=2.0.2", features = ["keccak"] }
utils = { version = "=0.1.0", path = "../utils/", default-features = false }
utils = { package = "zerokit_utils", version = "=0.1.0", path = "../utils/", default-features = false }

# serialization
serde_json = "1.0.48"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "=1.0.96"
serde = { version = "=1.0.163", features = ["derive"] }

include_dir = "=0.7.3"

[dev-dependencies]
sled = "=0.34.7"
criterion = { version = "0.4", features = ["html_reports"] }
criterion = { version = "=0.4.0", features = ["html_reports"] }

[features]
default = ["parallel", "wasmer/sys-default", "pmtree-ft"]
Expand Down
15 changes: 8 additions & 7 deletions utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
name = "utils"
name = "zerokit_utils"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Various utilities for Zerokit"

[lib]
bench = false
Expand All @@ -11,16 +12,16 @@ bench = false
ark-ff = { version = "=0.4.1", default-features = false, features = ["asm"] }
num-bigint = { version = "=0.4.3", default-features = false, features = ["rand"] }
color-eyre = "=0.6.2"
pmtree = { git = "https://github.com/vacp2p/pmtree", rev = "4521c44", optional = true}
pmtree = { package = "vacp2p_pmtree", version = "=1.0.0", optional = true}
sled = "=0.34.7"
serde = "1.0.44"
serde = "=1.0.163"

[dev-dependencies]
ark-bn254 = "=0.4.0"
num-traits = "0.2.11"
hex-literal = "0.3.4"
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
criterion = { version = "0.4", features = ["html_reports"] }
num-traits = "=0.2.15"
hex-literal = "=0.3.4"
tiny-keccak = { version = "=2.0.2", features = ["keccak"] }
criterion = { version = "=0.4.0", features = ["html_reports"] }

[features]
default = ["parallel"]
Expand Down
2 changes: 1 addition & 1 deletion utils/benches/merkle_tree_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use criterion::{criterion_group, criterion_main, Criterion};
use hex_literal::hex;
use tiny_keccak::{Hasher as _, Keccak};
use utils::{
use zerokit_utils::{
FullMerkleConfig, FullMerkleTree, Hasher, OptimalMerkleConfig, OptimalMerkleTree,
ZerokitMerkleTree,
};
Expand Down
2 changes: 1 addition & 1 deletion utils/tests/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mod test {
use hex_literal::hex;
use tiny_keccak::{Hasher as _, Keccak};
use utils::{
use zerokit_utils::{
FullMerkleConfig, FullMerkleTree, Hasher, OptimalMerkleConfig, OptimalMerkleTree,
ZerokitMerkleProof, ZerokitMerkleTree,
};
Expand Down
2 changes: 1 addition & 1 deletion utils/tests/poseidon_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod test {
use ark_bn254::Fr;
use num_bigint::BigUint;
use num_traits::Num;
use utils::poseidon_hash::Poseidon;
use zerokit_utils::poseidon_hash::Poseidon;

const ROUND_PARAMS: [(usize, usize, usize, usize); 8] = [
(2, 8, 56, 0),
Expand Down

0 comments on commit be2dccf

Please sign in to comment.