[package]
name = "foundry-compilers-core"
description = "Core utilities for foundry-compilers crates"

version = "0.21.0"
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
dunce.workspace = true
semver.workspace = true
serde_json.workspace = true
serde.workspace = true
thiserror.workspace = true

# hasher
xxhash-rust = { version = "0.8.15", optional = true, features = ["xxh3"] }

# regex
regex = { workspace = true, optional = true }

# walkdir
walkdir = { workspace = true, optional = true }

# svm-solc
svm = { workspace = true, optional = true }
# async
tokio = { workspace = true, optional = true }

# project-util
tempfile = { workspace = true, optional = true }
fs_extra = { workspace = true, optional = true }

[target.'cfg(windows)'.dependencies]
path-slash.workspace = true

[dev-dependencies]
tempfile.workspace = true

[features]
async = ["dep:tokio"]
hasher = ["dep:xxhash-rust"]
project-util = ["dep:tempfile", "dep:fs_extra"]
regex = ["dep:regex"]
svm-solc = ["dep:svm", "dep:tokio"]
walkdir = ["dep:walkdir"]

test-utils = ["dep:tempfile"]
