[workspace]
members = [".", "derive"]
resolver = "2"

[package]
name = "dory-pcs"
version = "0.4.0"
edition = "2021"
rust-version = "1.75"
authors = [
    "Markos Georghiades <mgeorghiades@a16z.com>",
]
license = "Apache-2.0 OR MIT"
description = "A high performance and modular implementation of the Dory polynomial commitment scheme."
repository = "https://github.com/a16z/dory"
documentation = "https://docs.rs/dory-pcs"
readme = "README.md"
keywords = ["cryptography", "zkp", "commitment", "polynomial", "pcs"]
categories = ["cryptography", "algorithms"]
include = [
    "src/**",
    "examples/**",
    "benches/**",
    "README.md",
    "CHANGELOG.md",
    "LICENSE-APACHE",
    "LICENSE-MIT",
    "Cargo.toml",
]

[package.metadata.docs.rs]
all-features = true


[features]
default = []
zk = []
backends = ["arkworks", "disk-persistence"]
arkworks = [
    "dep:ark-bn254",
    "dep:ark-ec",
    "dep:ark-ff",
    "dep:ark-serialize",
    "dep:ark-std",
    "dep:blake2",
    "dep:digest",
    "dep:bincode",
    "dep:serde",
]
parallel = ["dep:rayon", "ark-ec?/parallel", "ark-ff?/parallel"]
cache = ["arkworks", "parallel"]
disk-persistence = []

[dependencies]
thiserror = "2.0"
rand_core = { version = "0.6", features = ["getrandom"] }
dory-derive = { version = "0.3.0", path = "derive" }
tracing = "0.1"

# Arkworks backend
ark-bn254 = { version = "0.5.0", optional = true }
ark-ec = { version = "0.5", optional = true }
ark-ff = { version = "0.5", optional = true }
ark-serialize = { version = "0.5", optional = true }
ark-std = { version = "0.5", optional = true }
blake2 = { version = "0.10", optional = true }
digest = { version = "0.10", optional = true }
bincode = { version = "1.3", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
rayon = { version = "1.10", optional = true }

[dev-dependencies]
rand = "0.8"
criterion = { version = "0.5", features = ["html_reports"] }
tracing-subscriber = { version = "0.3", features = ["fmt"] }

[[example]]
name = "basic_e2e"
required-features = ["backends"]

[[example]]
name = "homomorphic"
required-features = ["backends"]

[[example]]
name = "non_square"
required-features = ["backends"]

[[example]]
name = "homomorphic_mixed_sizes"
required-features = ["backends"]

[[example]]
name = "zk_e2e"
required-features = ["backends", "zk"]

[[example]]
name = "zk_statistical"
required-features = ["backends", "zk"]

[[example]]
name = "zk_wrong_point"
required-features = ["backends", "zk"]

[[bench]]
name = "arkworks_proof"
harness = false
required-features = ["backends", "cache", "parallel"]

[lints.rust]
missing_docs = "warn"
unreachable_pub = "warn"

[lints.clippy]
missing_errors_doc = "warn"
missing_panics_doc = "warn"
