build: make sha2 and hex optional and gated by server feature

This commit is contained in:
xfy 2026-06-16 17:11:15 +08:00
parent fa5216c6c5
commit 1444ccef86

View File

@ -22,8 +22,8 @@ rand = { version = "0.8", features = ["getrandom"], optional = true }
http = { version = "1", optional = true } 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 = { version = "0.10", optional = true }
hex = "0.4" hex = { version = "0.4", optional = true }
lol_html = { version = "2", optional = true } lol_html = { version = "2", optional = true }
syntect = { version = "5", default-features = false, features = ["default-syntaxes", "default-themes", "default-fancy", "html", "parsing", "dump-load", "yaml-load"], optional = true } syntect = { version = "5", default-features = false, features = ["default-syntaxes", "default-themes", "default-fancy", "html", "parsing", "dump-load", "yaml-load"], optional = true }
# NOTE: WebP decoder is intentionally excluded from the image crate. # NOTE: WebP decoder is intentionally excluded from the image crate.
@ -65,6 +65,8 @@ server = [
"dep:pulldown-cmark", "dep:pulldown-cmark",
"dep:rand", "dep:rand",
"dep:http", "dep:http",
"dep:sha2",
"dep:hex",
"dep:dotenvy", "dep:dotenvy",
"dep:tracing", "dep:tracing",
"dep:tracing-subscriber", "dep:tracing-subscriber",