build: make http optional and gated by server feature

This commit is contained in:
xfy 2026-06-16 17:10:52 +08:00
parent d246adbb32
commit fa5216c6c5

View File

@ -19,7 +19,7 @@ tracing = { version = "0.1", optional = true, features = ["release_max_level_inf
tracing-subscriber = { version = "0.3", optional = true } tracing-subscriber = { version = "0.3", optional = true }
tower-http = { version = "0.6", optional = true } tower-http = { version = "0.6", optional = true }
rand = { version = "0.8", features = ["getrandom"], optional = true } rand = { version = "0.8", features = ["getrandom"], optional = true }
http = "1" http = { version = "1", optional = true }
axum = { version = "0.8", optional = true, features = ["multipart"] } axum = { version = "0.8", optional = true, features = ["multipart"] }
serde_json = "1.0" serde_json = "1.0"
sha2 = "0.10" sha2 = "0.10"
@ -64,6 +64,7 @@ server = [
"dep:regex", "dep:regex",
"dep:pulldown-cmark", "dep:pulldown-cmark",
"dep:rand", "dep:rand",
"dep:http",
"dep:dotenvy", "dep:dotenvy",
"dep:tracing", "dep:tracing",
"dep:tracing-subscriber", "dep:tracing-subscriber",