[package]
name = "ebi"
version = "0.3.12"
edition = "2024"
license = "MIT OR Apache-2.0"
keywords = ["stochastic-processes", "process-mining", "business-processes"]
categories = ["command-line-utilities"]
description = "A stochastic process mining utility and library"
homepage = "https://ebitools.org"
repository = "https://github.com/BPM-Research-Group/Ebi"
readme = "README.md"
exclude = ["/testfiles", "/manual", ".github/", ".*", "/documentation"]

[lib]
name = "ebi"
crate-type = ["cdylib", "lib"]

[features]
default = [ ]
test_generation = ["dep:syn"]
eexactarithmetic = []
exactarithmetic = [
    "eexactarithmetic",
    "ebi_objects/exactarithmetic",
    "ebi_optimisation/exactarithmetic",
]
approximatearithmetic = [
    "eapproximatearithmetic",
    "ebi_objects/approximatearithmetic",
    "ebi_optimisation/approximatearithmetic",
]
eapproximatearithmetic = []
testactivities = ["ebi_objects/testactivities"]
python = [
    "java",
    "dep:pyo3",
    "dep:polars",
    "dep:num-traits",
    "dep:syn",
    "dep:num-bigint",
]
java = ["dep:jni"]
javascript = ["dep:wasm-bindgen", "dep:syn", "dep:js-sys"]
extension-module = ["pyo3/extension-module"]

[dependencies]
ebi_optimisation = { git = "https://github.com/BPM-Research-Group/Ebi_optimisation.git", version = "0.3.8" }
ebi_objects = { git = "https://github.com/BPM-Research-Group/Ebi_objects.git", version = "0.3.187" }
ebi_derive = "0.2.11"
bitvec = "1.0.1"
clap = { version = "4.6.1", features = ["derive", "cargo", "string"] }
clap-verbosity-flag = "3.0.3"
log = { version = "0.4.30", features = ["release_max_level_debug"] }
env_logger = "0.11.10"
layout-rs = "0.1.3"
serde_json = "1.0.149"
priority-queue = "2.6.0"
process_mining = { version = "0.5.4", features = ["graphviz-export"] }
rand = "0.10.1"
rand_chacha = "0.10.0"
chrono = "0.4.44"
flate2 = "1.1.5"
rayon = "1.10.0"
strsim = "0.11.1"
Inflector = "0.11.4"
strum = "0.28.0"
strum_macros = "0.28.0"
indicatif = "0.18.4"
indexmap = "2.14.0"
pathfinding = "4.15.0"
fnv = "1.0.7"
itertools = "0.15.0"
serde = "1.0.228"
logging_timer = "1.1.1"
svg2pdf = "0.13.0"
uuid = "1.23.1"
cfg-if = "1.0.4"
ntest = "0.9.3"
regex = "1.12.3"
quick-xml = { version = "0.40.1", features = ["serialize"] }
pastey = "0.2.0"
intmap = "3.1.3"
rustc-hash = "2.1.2"
const_format = "0.2.36"
strongly-connected-components = "1.0.0"
pyo3 = { version = "0.27.1", features = [
    "abi3-py37",
    "generate-import-lib",
    "num-bigint",
], optional = true }
polars = { version = "0.32", features = ["ipc", "timezones"], optional = true }
num-traits = { version = "0.2", optional = true }
syn = { version = "2.0.118", features = ["parsing", "full"], optional = true }
jni = { version = "0.21.1", optional = true }
num-bigint = { version = "0.4.6", optional = true }
wasm-bindgen = { version = "0.2.121", optional = true }
js-sys = { version = "0.3.98", optional = true }

[profile.release]
debug = false
strip = true
panic = 'abort'
opt-level = 2
lto = true
codegen-units = 8

[dev-dependencies]
ebi = { path = ".", default-features = false, features = ["testactivities"] }

# trick from https://users.rust-lang.org/t/getrandom-version-conflict-error-building-a-wasm/132355
[target.wasm32-unknown-unknown.dependencies]
uuid = { version = "1.23.1", features = ["js"] }
getrandom_v2 = { version = "0.2", features = ["js"], package = "getrandom" }
getrandom = { version = "0.3", features = ["wasm_js"] }
getrandom_v3 = { version = "0.4.2", features = [
    "wasm_js",
], package = "getrandom" }

# fix from https://github.com/leptos-rs/leptos/issues/4004?issue=leptos-rs%7Ccargo-leptos%7C441
[package.metadata.wasm-pack.profile.release]
wasm-opt = ['-Oz', '--enable-bulk-memory', '--all-features']
