# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.91.1"
name = "tfhe"
version = "1.6.0"
build = "build.rs"
exclude = [
    "/docs/",
    "/c_api_tests/",
    "/CMakeLists.txt",
    "/js_on_wasm_tests/",
    "/web_wasm_parallel_tests/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "TFHE-rs is a fully homomorphic encryption (FHE) library that implements Zama's variant of TFHE."
homepage = "https://zama.org/"
documentation = "https://docs.zama.org/tfhe-rs"
readme = "README.md"
keywords = [
    "fully",
    "homomorphic",
    "encryption",
    "fhe",
    "cryptography",
]
license = "BSD-3-Clause-Clear"
repository = "https://github.com/zama-ai/tfhe-rs"
resolver = "3"

[package.metadata.docs.rs]
features = [
    "boolean",
    "shortint",
    "integer",
    "gpu",
    "zk-pok",
    "software-prng",
    "strings",
    "hpu",
    "extended-types",
]
rustdoc-args = [
    "--html-in-header",
    "katex-header.html",
]

[features]
__c_api = ["dep:cbindgen"]
__force_skip_cbindgen = []
__profiling = []
__wasm_api = [
    "dep:wasm-bindgen",
    "dep:js-sys",
    "dep:console_error_panic_hook",
    "dep:serde-wasm-bindgen",
    "dep:getrandom",
    "getrandom/js",
    "dep:wasm-bindgen-futures",
]
avx512 = [
    "tfhe-fft/avx512",
    "tfhe-ntt/avx512",
    "pulp/x86-v4",
]
boolean = []
boolean-c-api = [
    "boolean",
    "__c_api",
]
boolean-client-js-wasm-api = [
    "boolean",
    "__wasm_api",
]
cross-origin-wasm-api = [
    "dep:wasm-par-mq",
    "tfhe-zk-pok?/cross-origin-wasm",
]
default = ["avx512"]
experimental = []
experimental-force_fft_algo_dif4 = []
extended-types = []
gpu = [
    "dep:tfhe-cuda-backend",
    "shortint",
]
gpu-debug = [
    "gpu",
    "tfhe-cuda-backend/debug",
]
gpu-debug-fake-multi-gpu = [
    "gpu",
    "tfhe-cuda-backend/debug-fake-multi-gpu",
]
gpu-experimental-multi-arch = [
    "gpu",
    "tfhe-cuda-backend/experimental-multi-arch",
]
gpu-experimental-zk = [
    "gpu",
    "zk-pok",
    "tfhe-zk-pok/gpu-experimental",
]
gpu-profile = [
    "gpu",
    "tfhe-cuda-backend/profile",
]
high-level-c-api = [
    "boolean-c-api",
    "shortint-c-api",
    "integer",
]
high-level-client-js-wasm-api = [
    "boolean-client-js-wasm-api",
    "integer-client-js-wasm-api",
]
hpu = [
    "dep:tfhe-hpu-backend",
    "shortint",
    "integer",
]
hpu-debug = [
    "hpu",
    "tfhe-hpu-backend/io-dump",
]
hpu-v80 = [
    "hpu",
    "tfhe-hpu-backend/hw-v80",
]
hpu-xrt = [
    "hpu",
    "tfhe-hpu-backend/hw-xrt",
]
integer = [
    "shortint",
    "dep:strum",
]
integer-client-js-wasm-api = [
    "integer",
    "shortint-client-js-wasm-api",
]
internal-keycache = ["dep:fs2"]
nightly-avx512 = ["avx512"]
noise-asserts = []
parallel-wasm-api = ["dep:wasm-bindgen-rayon"]
pbs-stats = []
shortint = [
    "dep:sha3",
    "dep:blake3",
]
shortint-c-api = [
    "shortint",
    "__c_api",
]
shortint-client-js-wasm-api = [
    "shortint",
    "__wasm_api",
]
software-prng = ["tfhe-csprng/software-prng"]
strings = ["integer"]
zk-pok = ["dep:tfhe-zk-pok"]

[lib]
name = "tfhe"
crate-type = [
    "lib",
    "staticlib",
    "cdylib",
]
path = "src/lib.rs"

[[example]]
name = "dark_market"
path = "examples/dark_market/main.rs"
required-features = [
    "integer",
    "internal-keycache",
]

[[example]]
name = "generates_test_keys"
path = "examples/utilities/generates_test_keys.rs"
required-features = [
    "boolean",
    "shortint",
    "internal-keycache",
]

[[example]]
name = "hpu_bench"
path = "examples/hpu/bench.rs"
required-features = ["hpu"]

[[example]]
name = "hpu_hlapi"
path = "examples/hpu/hlapi.rs"
required-features = ["hpu"]

[[example]]
name = "hpu_matmul"
path = "examples/hpu/matmul.rs"
required-features = ["hpu"]

[[example]]
name = "manual_fft"
path = "examples/manual_fft.rs"
required-features = ["integer"]

[[example]]
name = "micro_bench_and"
path = "examples/utilities/micro_bench_and.rs"
required-features = ["boolean"]

[[example]]
name = "pbs_count"
path = "examples/pbs_count.rs"
required-features = [
    "integer",
    "pbs-stats",
]

[[example]]
name = "print_doc_bench_parameters"
path = "examples/utilities/print_doc_bench_parameters.rs"
required-features = [
    "shortint",
    "internal-keycache",
]

[[example]]
name = "regex_engine"
path = "examples/regex_engine/main.rs"
required-features = ["integer"]

[[example]]
name = "sha256"
path = "examples/sha256.rs"
required-features = ["integer"]

[[example]]
name = "sha256_bool"
path = "examples/sha256_bool/main.rs"
required-features = ["boolean"]

[[example]]
name = "write_params_to_file"
path = "examples/utilities/params_to_file.rs"
required-features = [
    "boolean",
    "shortint",
    "internal-keycache",
    "hpu",
]

[[test]]
name = "hpu"
path = "tests/hpu.rs"

[[test]]
name = "zk_wasm_x86_test"
path = "tests/zk_wasm_x86_test.rs"

[dependencies.aligned-vec]
version = "0.6"
features = [
    "default",
    "serde",
]
default-features = false

[dependencies.bincode]
version = "=1.3.3"

[dependencies.blake3]
version = "1.8"
optional = true

[dependencies.bytemuck]
version = "1.24"

[dependencies.console_error_panic_hook]
version = "0.1.7"
optional = true

[dependencies.dyn-stack]
version = "0.13"
features = ["default"]
default-features = false

[dependencies.fs2]
version = "0.4.3"
optional = true

[dependencies.getrandom]
version = "0.2.17"
optional = true

[dependencies.itertools]
version = "0.14"

[dependencies.js-sys]
version = "0.3.91"
features = ["std"]
optional = true
default-features = false

[dependencies.paste]
version = "1.0.15"

[dependencies.pulp]
version = "0.22"
features = ["default"]
default-features = false

[dependencies.rand_core]
version = "0.6.4"
features = ["std"]

[dependencies.rayon]
version = "1.11"

[dependencies.serde]
version = "1.0"
features = [
    "default",
    "derive",
]
default-features = false

[dependencies.serde-wasm-bindgen]
version = "0.6.5"
optional = true

[dependencies.sha3]
version = "0.10"
optional = true

[dependencies.strum]
version = "0.27"
features = ["derive"]
optional = true

[dependencies.tfhe-csprng]
version = "0.9.0"
features = ["parallel"]

[dependencies.tfhe-cuda-backend]
version = "0.14.0"
optional = true

[dependencies.tfhe-fft]
version = "0.10.1"
features = [
    "serde",
    "fft128",
]

[dependencies.tfhe-hpu-backend]
version = "0.5"
optional = true

[dependencies.tfhe-ntt]
version = "0.7.0"

[dependencies.tfhe-safe-serialize]
version = "0.1.0"

[dependencies.tfhe-versionable]
version = "0.7.0"

[dependencies.tfhe-zk-pok]
version = "0.8.1"
optional = true

[dependencies.wasm-bindgen]
version = "0.2.114"
features = ["serde-serialize"]
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4.56"
optional = true

[dependencies.wasm-bindgen-rayon]
version = "1.3.0"
optional = true

[dependencies.wasm-par-mq]
version = "0.1.0"
features = ["sync-api"]
optional = true

[dev-dependencies.clap]
version = "=4.5.30"
features = ["derive"]

[dev-dependencies.clap-num]
version = "1.1.1"

[dev-dependencies.combine]
version = "4.6.6"

[dev-dependencies.criterion]
version = "0.5.1"

[dev-dependencies.csv]
version = "1.3.0"

[dev-dependencies.doc-comment]
version = "0.3.3"

[dev-dependencies.env_logger]
version = "0.11"

[dev-dependencies.fs2]
version = "0.4.3"

[dev-dependencies.hex]
version = "0.4.3"

[dev-dependencies.log]
version = "0.4.19"

[dev-dependencies.num-bigint]
version = "0.4.6"

[dev-dependencies.rand]
version = "0.8"

[dev-dependencies.rand_distr]
version = "0.4.3"

[dev-dependencies.serde_json]
version = "1.0.94"

[dev-dependencies.statrs]
version = "0.18"

[dev-dependencies.test-case]
version = "3.1.0"

[dev-dependencies.tracing-subscriber]
version = "0.3.18"
features = ["env-filter"]

[build-dependencies.cbindgen]
version = "0.28"
optional = true

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(tarpaulin)",
    "cfg(dylint_lib, values(any()))",
    "cfg(wasm_bindgen_unstable_test_coverage)",
]
