[package]
name = "kanidmd_lib"
description = "Kanidm Server Backend Library"
documentation = "https://docs.rs/kanidm/latest/kanidm/"

version = { workspace = true }
authors = { workspace = true }
rust-version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[lib]
name = "kanidmd_lib"
path = "src/lib.rs"
test = true
doctest = false

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

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

[dependencies]
base64 = { workspace = true }
base64urlsafedata = { workspace = true }
bitflags = { workspace = true }
compact_jwt = { workspace = true, features = ["openssl", "hsm-crypto"] }
concread = { workspace = true }
dyn-clone = { workspace = true }
enum-iterator = { workspace = true }
fernet = { workspace = true, features = ["fernet_danger_timestamps"] }
# futures-util = { workspace = true }
hashbrown = { workspace = true }
idlset = { workspace = true }
itertools = { workspace = true }
kanidm_proto = { workspace = true }
kanidm_lib_crypto = { workspace = true }
lazy_static = { workspace = true }
ldap3_proto = { workspace = true }
libc = { workspace = true }
libsqlite3-sys = { workspace = true }
num_enum = { workspace = true }
# We need to explicitly ask for openssl-sys so that we get the version propagated
# into the build.rs for legacy feature checks.
openssl-sys = { workspace = true }
openssl = { workspace = true }
rand = { workspace = true }
regex = { workspace = true, features = [
    "std",
    "perf",
    "perf-inline",
    "unicode",
    "unicode-gencat",
] }
rusqlite = { workspace = true, features = ["array", "bundled"] }

serde = { workspace = true, features = ["derive"] }
serde_cbor = { workspace = true }
serde_json = { workspace = true }
sketching = { workspace = true }
smartstring = { workspace = true, features = ["serde"] }
smolset = { workspace = true }
sshkey-attest = { workspace = true }
time = { workspace = true, features = ["serde", "std"] }
tokio = { workspace = true, features = ["net", "sync", "time", "rt"] }
tokio-util = { workspace = true, features = ["codec"] }
toml = { workspace = true }
nonempty = { workspace = true, features = ["serialize"] }

tracing = { workspace = true, features = ["attributes"] }

url = { workspace = true, features = ["serde"] }
urlencoding = { workspace = true }
uuid = { workspace = true, features = ["serde", "v4"] }
webauthn-rs = { workspace = true, features = [
    "resident-key-support",
    "preview-features",
    "danger-credential-internals",
] }
webauthn-rs-core = { workspace = true }
zxcvbn = { workspace = true }
serde_with = { workspace = true }
hex.workspace = true
lodepng = { workspace = true }
image = { workspace = true, default-features = false, features = [
    "gif",
    "jpeg",
    "webp",
] }
svg = { workspace = true }

# because windows really can't build without the bundled one
[target.'cfg(target_family = "windows")'.dependencies]
whoami = { workspace = true }

[features]
# default = [ "libsqlite3-sys/bundled", "openssl/vendored" ]

[dev-dependencies]
criterion = { workspace = true, features = ["html_reports"] }
webauthn-authenticator-rs = { workspace = true }

futures = { workspace = true }
kanidmd_lib_macros = { workspace = true }

compact_jwt = { workspace = true, features = ["openssl", "hsm-crypto", "unsafe_release_without_verify"] }

[build-dependencies]
hashbrown = { workspace = true }
kanidm_build_profiles = { workspace = true }
regex = { workspace = true }
