[package]
name = "espresso-logic"
version = "4.1.0"
edition = "2021"
rust-version = "1.82"
authors = ["Marcos Sartori <marcos.sartori@ncl.ac.uk>"]
description = "Rust bindings for the Espresso heuristic logic minimizer (UC Berkeley)"
license = "MIT"
repository = "https://github.com/marlls1989/espresso-logic"
keywords = ["logic", "minimization", "boolean", "pla", "espresso"]
categories = ["algorithms", "science"]

# Development- and verification-only material: regression/test data, dev scripts, hard test cases, the
# benchmark, and CI config. None of it is needed to build or use the crate, so keep it out of the
# published package. The regression shell scripts and the benchmark are excluded because they rely on
# the excluded data dirs (`pla/`, `tlex/`, `hard_examples/`); cargo just drops the now-sourceless
# `[[bench]]` target with a harmless warning. The Rust integration tests (tests/*.rs) are kept. Paths
# are anchored with a leading `/` so nested directories such as `src/cover/pla` are unaffected.
exclude = [
    "/pla",
    "/tlex",
    "/hard_examples",
    "/scripts",
    "/benches",
    "/tests/regression_test.sh",
    "/tests/quick_regression.sh",
    "/benchmark_results.log",
    "/.travis.yml",
    "/TESTING.md",
]

[dependencies]
libc = "0.2"
weak-table = "0.3"
lalrpop-util = { version = "0.20", features = ["lexer"] }
clap = { version = "4.4", features = ["derive"], optional = true }
espresso-logic-macros = { version = "4.1.0", path = "./espresso-logic-macros" }

[features]
cli = ["dep:clap"]

[dev-dependencies]
tempfile = "3.8"
criterion = { version = "0.5", features = ["html_reports"] }

[build-dependencies]
cc = "1.0"
bindgen = "0.69"
lalrpop = "0.20"

[lib]
name = "espresso_logic"
path = "src/lib.rs"

[[example]]
name = "minimize"
path = "examples/minimize.rs"

[[example]]
name = "pla_file"
path = "examples/pla_file.rs"

[[bin]]
name = "espresso"
path = "src/bin/espresso.rs"
required-features = ["cli"]

[[example]]
name = "xor_function"
path = "examples/xor_function.rs"

[[example]]
name = "transparent_api"
path = "examples/transparent_api.rs"

[[example]]
name = "concurrent_transparent"
path = "examples/concurrent_transparent.rs"

[[example]]
name = "boolean_expressions"
path = "examples/boolean_expressions.rs"

[[example]]
name = "espresso_direct_api"
path = "examples/espresso_direct_api.rs"

[[example]]
name = "c_element_example"
path = "examples/c_element_example.rs"

[[example]]
name = "threshold_gate_example"
path = "examples/threshold_gate_example.rs"

[[example]]
name = "expr_macro_demo"
path = "examples/expr_macro_demo.rs"

[[example]]
name = "inspect_cubes"
path = "examples/inspect_cubes.rs"

[[example]]
name = "expression_composition"
path = "examples/expression_composition.rs"

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

