[package]
name = "bougie-server"
version.workspace = true
edition = "2024"
description = "Embedded HTTP / FastCGI dev server for bougie."
license = "EUPL-1.2"
repository = "https://github.com/cresset-tools/bougie"
rust-version = "1.95"
authors.workspace = true

[dependencies]
bougie-autoloader = { workspace = true }
bougie-cli = { workspace = true }
bougie-config = { workspace = true }
bougie-errors = { workspace = true }
bougie-fs = { workspace = true }
bougie-installer = { workspace = true }
bougie-output = { workspace = true }
bougie-paths = { workspace = true }
bougie-resolver = { workspace = true }

[dependencies.anstream]
version = "1.0"

[dependencies.anstyle]
version = "1.0"

[dependencies.axum]
version = "0.8"
default-features = false
features = ["http1", "tokio"]

[dependencies.eyre]
version = "0.6"

[dependencies.http-body-util]
version = "0.1"

[dependencies.mime_guess]
version = "2"
default-features = false

[dependencies.notify]
version = "8"

[dependencies.percent-encoding]
version = "2"

[dependencies.regex]
version = "1.11"
default-features = false
features = ["std", "perf"]

[dependencies.reqwest]
version = "0.13"
default-features = false
features = ["blocking", "rustls"]

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"
features = ["preserve_order"]

[dependencies.sha2]
version = "0.11"

[dependencies.tempfile]
version = "3.10"

[dependencies.tokio]
version = "1"
default-features = false
features = [
    "rt-multi-thread", "net", "process", "signal", "fs",
    "macros", "time", "sync", "io-util",
]

[dependencies.tokio-util]
version = "0.7"
default-features = false
features = ["io"]

[dependencies.toml_edit]
version = "0.25"
features = ["serde"]

[dependencies.tracing]
version = "0.1"

# Unix-only: SIGUSR2 to php-fpm for in-place reload, geteuid() for the
# $XDG_RUNTIME_DIR fallback, sudo-aware config path resolution. No
# direct Windows equivalents (Windows uses kill+respawn for reload and
# %LOCALAPPDATA% for runtime root).
[target.'cfg(unix)'.dependencies]
rustix = { version = "1.0", default-features = false, features = ["std", "fs", "process"] }

# Windows-only: random ephemeral-port selection for `php-cgi.exe -b
# 127.0.0.1:<port>` (php-cgi.exe rejects port 0, so we can't ask the
# kernel to autoselect — we pick a port, spawn, and retry on bind
# collision).
[target.'cfg(windows)'.dependencies]
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }

[lints]
workspace = true
