[package]
name = "neptune"
description = "Poseidon hashing over BLS12-381 for Filecoin."
version = "8.0.0"
authors = ["porcuquine <porcuquine@gmail.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/filecoin-project/neptune"
resolver = "2"

[dependencies]
lazy_static = "1.4.0"
bellperson = { version = "0.24", default-features = false }
blake2s_simd = "0.5"
blstrs = { version = "0.6.0", optional = true }
byteorder = "1"
ec-gpu = { version = "0.2.0", optional = true }
ec-gpu-gen = { version = "0.5.0", optional = true }
ff = "0.12.0"
generic-array = "0.14.4"
itertools = { version = "0.8.0" }
log = "0.4.8"
pasta_curves = { version = "0.5.1", package = "fil_pasta_curves" }
trait-set = "0.3.0"

[dev-dependencies]
blstrs = "0.6.1"
criterion = "0.3"
rand = "0.8.0"
rand_xorshift = "0.3.0"
serde_json = "1.0.53"
sha2 = "0.9"

[build-dependencies]
blstrs = "0.6.1"
ec-gpu = { version = "0.2.0", optional = true }
ec-gpu-gen = { version = "0.5.0", optional = true }
pasta_curves = { version = "0.5.1", package = "fil_pasta_curves" }

[[bench]]
name = "hash"
harness = false

[[bench]]
name = "synthesis"
harness = false

[profile.bench]
incremental = false
codegen-units = 1

[features]
default = [ "bellperson/default" ]
cuda = ["ec-gpu-gen/cuda", "ec-gpu", "pasta_curves/gpu"]
opencl = ["ec-gpu-gen/opencl", "ec-gpu", "pasta_curves/gpu"]
# The supported arities for Poseidon running on the GPU are specified at compile-time.
arity2 = []
arity4 = []
arity8 = []
arity11 = []
arity16 = []
arity24 = []
arity36 = []
# With this feature set, also the strengthened version of the kernel will be compiled.
strengthened = []
# The supported fields for Poseidon running on the GPU are specified at compile-time.
bls = ["blstrs/gpu"]
pasta = ["pasta_curves/gpu"]

[workspace]
members = [
  "gbench",
]
