[workspace]
resolver = "2"
members = [
    "crates/core",
    "crates/dhcp-proxy",
    "crates/tftp",
    "crates/http-api",
    "crates/iso-store",
    "crates/ipxe-assets",
    "crates/webui",
    "crates/pxeforge",
]

[workspace.package]
version = "0.1.0"
edition = "2021"
rust-version = "1.80"
license = "MIT OR Apache-2.0"
repository = "https://github.com/casperadmin/PXEForge"
authors = ["PXEForge contributors"]

[workspace.dependencies]
tokio = { version = "1.40", features = ["full"] }
tokio-util = { version = "0.7", features = ["io"] }
tokio-stream = { version = "0.1", features = ["sync"] }
futures = "0.3"
async-trait = "0.1"

dhcproto = "0.12"
socket2 = { version = "0.5", features = ["all"] }
bytes = "1.7"
nom = "7.1"

axum = { version = "0.7", features = ["macros", "multipart", "http2"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["fs", "trace", "cors", "limit"] }
hyper = "1.4"
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream"] }
mime = "0.3"
mime_guess = "2.0"

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"

tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }

anyhow = "1.0"
thiserror = "1.0"
clap = { version = "4.5", features = ["derive", "env"] }
uuid = { version = "1.10", features = ["v4", "serde"] }
time = { version = "0.3", features = ["serde", "serde-human-readable", "formatting", "macros"] }
sha2 = "0.10"
hex = "0.4"
once_cell = "1.19"
parking_lot = "0.12"
rust-embed = { version = "8.5", features = ["include-exclude"] }

pxeforge-core = { path = "crates/core" }
pxeforge-dhcp-proxy = { path = "crates/dhcp-proxy" }
pxeforge-tftp = { path = "crates/tftp" }
pxeforge-http-api = { path = "crates/http-api" }
pxeforge-iso-store = { path = "crates/iso-store" }
pxeforge-ipxe-assets = { path = "crates/ipxe-assets" }
pxeforge-webui = { path = "crates/webui" }

[workspace.lints.rust]
unsafe_code = "deny"
rust_2018_idioms = { level = "warn", priority = -1 }

[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
module_name_repetitions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
doc_markdown = "allow"
items_after_statements = "allow"
cast_possible_truncation = "allow"
cast_lossless = "allow"
cast_sign_loss = "allow"
similar_names = "allow"
too_many_lines = "allow"

[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"
opt-level = 3
