[package]
name = "dprint-core"
version = "0.59.1"
authors = ["David Sherret <dsherret@gmail.com>"]
edition = "2021"
homepage = "https://github.com/dprint/dprint/tree/main/crates/core"
keywords = ["formatting", "formatter"]
license = "MIT"
repository = "https://github.com/dprint/dprint"
description = "Core library for dprint."

[features]
default = ["formatting"]

formatting = ["bumpalo", "rustc-hash"]
communication = ["crossbeam-channel", "tokio", "parking_lot", "tokio-util"]
process = ["communication", "serde_json", "libc", "winapi"]
wasm = []
tracing = ["formatting"]

[dependencies]
anyhow = "1.0.66"
bumpalo = { version = "3.11.1", optional = true }
crossbeam-channel = { version = "0.5.6", optional = true }
indexmap = { version = "1.9.2", features = ["serde-1"] }
parking_lot = { version = "0.12.1", optional = true }
rustc-hash = { version = "1.1.0", optional = true }
serde = { version = "1.0.147", features = ["derive"] }
serde_json = { version = "1.0", optional = true, features = ["preserve_order"] }
tokio = { version = "1", optional = true, features = ["rt", "time"] }
tokio-util = { version = "0.7.4", optional = true }

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["handleapi", "synchapi", "winbase", "winerror"], optional = true }

[target.'cfg(not(any(target_os = "unknown", target_arch = "wasm32")))'.dependencies]
libc = { version = "0.2.137", optional = true }
