feat: Make 'server' feature optional and add compile-time check
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
13
Cargo.toml
13
Cargo.toml
@@ -11,7 +11,7 @@ categories = ["command-line-utilities"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.72"
|
||||
axum = "0.8.4"
|
||||
axum = { version = "0.8.4", optional = true }
|
||||
derive_more = { version = "2.0", features = ["full"] }
|
||||
smart-default = "0.7"
|
||||
thiserror = "1.0"
|
||||
@@ -56,9 +56,9 @@ term = "1.1.0"
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
tokio-stream = "0.1"
|
||||
tokio-util = "0.7.16"
|
||||
tower = "0.5.2"
|
||||
tower-http = { version = "0.6.6", features = ["cors", "fs", "trace"] }
|
||||
utoipa = { version = "5.4.0", features = ["axum_extras"] }
|
||||
tower = { version = "0.5.2", optional = true }
|
||||
tower-http = { version = "0.6.6", features = ["cors", "fs", "trace"], optional = true }
|
||||
utoipa = { version = "5.4.0", features = ["axum_extras"], optional = true }
|
||||
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"], optional = true }
|
||||
uzers = "0.12.1"
|
||||
which = "8.0.0"
|
||||
@@ -69,7 +69,10 @@ pest_derive = "2.8.1"
|
||||
|
||||
[features]
|
||||
# Default features include core compression engines and swagger UI
|
||||
default = ["magic", "gzip", "lz4", "swagger"]
|
||||
default = ["server", "magic", "gzip", "lz4", "swagger"]
|
||||
|
||||
# Server feature (includes axum and related dependencies)
|
||||
server = ["dep:axum", "dep:tower", "dep:tower-http", "dep:utoipa"]
|
||||
|
||||
# Compression features
|
||||
gzip = ["flate2"]
|
||||
|
||||
Reference in New Issue
Block a user