[package]
name = "necessist-core"
version = "3.1.0"
edition = "2024"

description = "necessist-core"

authors = ["Samuel Moelius <sam@moeli.us>"]
license = "AGPL-3.0"
repository = "https://github.com/trailofbits/necessist"

[dependencies]
ansi_term = "0.12"
anyhow = "1.0"
bitflags = "2.13"
clap = { version = "4.6", features = ["cargo", "derive"], optional = true }
ctrlc = "3.5"
diesel = { version = "2.3", features = ["sqlite"] }
dunce = "1.0"
git2 = "0.21"
heck = "0.5"
hex = "0.4"
indexmap = "2.14"
indicatif = "0.18"
itertools = "0.15"
log = "0.4"
once_cell = "1.21"
proc-macro2 = { version = "1.0", features = ["span-locations"] }
regex = "1.13"
remain = "0.2"
rewriter = { version = "0.2", features = ["proc-macro2-impl"] }
serde = { version = "1.0", features = ["derive"] }
sha2 = "0.11"
strum = "0.28"
strum_macros = "0.28"
subprocess = "1.2"
tempfile = "3.27"
toml = "1.1"

[target.'cfg(unix)'.dependencies]
libc = { version = "0.2", optional = true }
rlimit = { version = "0.11", optional = true }

[target.'cfg(windows)'.dependencies]
libsqlite3-sys = { version = "0.37", features = ["bundled"] }
windows-sys = { version = "0.61", features = [
    "Win32_Storage_FileSystem",
    "Win32_Foundation",
    "Win32_System_IO",
], optional = true }

[dev-dependencies]
assert_cmd = "2.2"
predicates = "3.1"

[build-dependencies]
cargo_metadata = "0.23"
curl = "0.4"
heck = "0.5"
syn = "2.0"

[features]
default = ["limit_threads", "lock_root"]
limit_threads = ["rlimit"]
lock_root = ["libc", "windows-sys"]

[lints]
workspace = true
