Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust anyhow scope and remove unused dependencies #96

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 38 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
name = "decaf377"
version = "0.8.0"
authors = ["Henry de Valence <hdevalence@hdevalence.ca>", "redshiftzero <jen@penumbralabs.xyz>"]
authors = [
"Henry de Valence <hdevalence@hdevalence.ca>",
"redshiftzero <jen@penumbralabs.xyz>",
]
description = "A prime-order group designed for use in SNARKs over BLS12-377"
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -11,46 +14,66 @@ license = "MIT OR Apache-2.0"
[dependencies]
# no-alloc, no-std
cfg-if = "1.0"
hex = { version ="=0.4.3", default-features = false }
subtle = { version="2.5", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false }
hex = { version = "=0.4.3", default-features = false }
subtle = { version = "2.5", default-features = false }
zeroize = { version = "1.7", default-features = false }
# no-std
anyhow = { version = "1.0", default-features = false }
num-bigint = { version= "0.4.4", optional = true, default-features = false }
hashbrown = "0.14.3"
tracing = { version = "0.1", default-features = false }
num-bigint = { version = "0.4.4", optional = true, default-features = false }
# std
hashbrown = { version = "0.14.3", optional = true }
ark-relations = { version = "0.4", optional = true }
ark-r1cs-std = { version = "0.4", optional = true }
ark-std = { version = "0.4", optional = true }
ark-ec = { version = "0.4", optional = true }
ark-ff = { version = "0.4", optional = true }
ark-ff = { version = "0.4", optional = true }
ark-serialize = { version = "0.4", optional = true }
ark-bls12-377 = { version = "0.4", optional = true }
ark-ed-on-bls12-377 = { version = "0.4", optional = true }
ark-groth16 = { version = "0.4", optional = true }
ark-snark = { version = "0.4", optional = true }
once_cell = { version= "1.8", optional = true, default-features = false }
once_cell = { version = "1.8", optional = true, default-features = false }

# This matches what ark-std (a library for no_std compatibility) does, having
# a default feature of std - without the ark-std std feature, decaf377 doesn't
# compile
[features]
default = ["arkworks"]
alloc = ["once_cell/alloc", "tracing-subscriber/alloc", "zeroize/alloc"]
std = ["alloc", "tracing/std", "anyhow/std", "tracing-subscriber/std", "zeroize/std", "once_cell/std", "num-bigint/std", "hex/std", "subtle/std"]
parallel = ["ark-ff/parallel", "ark-ec/parallel", "ark-groth16/parallel", "ark-std/parallel", "ark-r1cs-std/parallel"]
alloc = ["once_cell/alloc", "zeroize/alloc"]
std = [
"alloc",
"zeroize/std",
"once_cell/std",
"num-bigint/std",
"hex/std",
"subtle/std",
]
parallel = [
"ark-ff/parallel",
"ark-ec/parallel",
"ark-groth16/parallel",
"ark-std/parallel",
"ark-r1cs-std/parallel",
]
# TODO: eventually, feature-gate all arkworks deps behind this feature.
arkworks = ["std", "ark-std", "ark-ec", "ark-ff", "ark-serialize", "ark-bls12-377", "ark-ed-on-bls12-377"]
arkworks = [
"std",
"ark-std",
"ark-ec",
"ark-ff",
"ark-serialize",
"ark-bls12-377",
"ark-ed-on-bls12-377",
"hashbrown",
]
r1cs = ["arkworks", "ark-groth16", "ark-r1cs-std", "ark-relations", "ark-snark"]
u32_backend = []

[dev-dependencies]
proptest = "1"
criterion = { version = "0.3", features=["html_reports"] }
criterion = { version = "0.3", features = ["html_reports"] }
rand_core = { version = "0.6.3", features = ["getrandom"] }
rand_chacha = "0.3"
anyhow = { version = "1.0" }

[[test]]
name = "encoding"
Expand Down
Loading