[package]
name = "powdr-backend"
description = "powdr backend types and API"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[features]
default = []
plonky3 = [
  "dep:powdr-plonky3",
  "dep:p3-commit",
  "dep:p3-matrix",
  "dep:p3-uni-stark",
]
stwo = ["dep:stwo-prover"]

# Enable AVX or Neon accordingly in backends that support them.
plonky3-simd = ["powdr-plonky3?/nightly-features"]

[dependencies]
powdr-ast.workspace = true
powdr-number.workspace = true
powdr-parser.workspace = true
powdr-pil-analyzer.workspace = true
powdr-executor.workspace = true
powdr-executor-utils.workspace = true
powdr-parser-util.workspace = true
powdr-backend-utils.workspace = true

powdr-plonky3 = { path = "../plonky3", optional = true }

rayon = "1.7.0"

p3-commit = { git = "https://github.com/plonky3/Plonky3.git", rev = "2192432ddf28e7359dd2c577447886463e6124f0", features = [
  "test-utils",
], optional = true }
p3-matrix = { git = "https://github.com/plonky3/Plonky3.git", rev = "2192432ddf28e7359dd2c577447886463e6124f0", optional = true }
p3-uni-stark = { git = "https://github.com/plonky3/Plonky3.git", rev = "2192432ddf28e7359dd2c577447886463e6124f0", optional = true }
stwo-prover = { git = "https://github.com/starkware-libs/stwo.git", optional = true, rev = "c26d2ab", features = [
  "parallel",
] }

strum = { version = "0.24.1", features = ["derive"] }
log = "0.4.27"
tracing = "0.1.37"
serde = "1.0"
serde_json = "1.0"
bincode = "1.3.3"
hex = "0.4"
thiserror = "1.0.43"
mktemp = "0.5.0"
num-traits = "0.2.15"
num-integer = "0.1.45"
itertools = "0.13"
rand = "0.8.5"
derive_more = { version = "1.0.0", features = ["from", "display"] }

[dev-dependencies]
test-log = "0.2.12"
env_logger = "0.10.0"
powdr-pipeline.workspace = true

[package.metadata.cargo-udeps.ignore]
development = ["env_logger"]

[lints]
workspace = true

[lib]
bench = false # See https://github.com/bheisler/criterion.rs/issues/458
