[package]
name = "bg3rustpaklib"
version = "0.1.3"
edition = "2021"
authors = ["bg3rustpaklib contributors"]
description = "A Rust library for reading and extracting Baldur's Gate 3 PAK files"
license = "MIT"
repository = "https://github.com/defakof/bg3rustpaklib"
keywords = ["baldurs-gate-3", "bg3", "pak", "lspk", "modding"]
categories = ["parsing", "game-development"]

[package.metadata.docs.rs]
features = ["async", "regex"]

[dependencies]
thiserror = "2"
memmap2 = "0.9"
lz4_flex = "0.11"
zstd = "0.13"
flate2 = { version = "1.0", default-features = false, features = ["zlib-ng"] }
globset = "0.4"
md5 = "0.7"
rayon = "1.10"

[dependencies.regex]
version = "1"
optional = true

[dependencies.tokio]
version = "1"
features = ["fs", "io-util", "sync", "rt"]
optional = true

[features]
default = []
async = ["tokio"]
regex = ["dep:regex"]

[dev-dependencies]
tempfile = "3"
regex = "1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
criterion = { version = "0.5", features = ["html_reports"] }

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

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"

[profile.release.build-override]
opt-level = 3
