From 1444ccef86654132fb5c188fca7c26489572e4d1 Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 16 Jun 2026 17:11:15 +0800 Subject: [PATCH] build: make sha2 and hex optional and gated by server feature --- Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 39afec7..2533ef5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,8 @@ rand = { version = "0.8", features = ["getrandom"], optional = true } http = { version = "1", optional = true } axum = { version = "0.8", optional = true, features = ["multipart"] } serde_json = "1.0" -sha2 = "0.10" -hex = "0.4" +sha2 = { version = "0.10", optional = true } +hex = { version = "0.4", 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 } # NOTE: WebP decoder is intentionally excluded from the image crate. @@ -65,6 +65,8 @@ server = [ "dep:pulldown-cmark", "dep:rand", "dep:http", + "dep:sha2", + "dep:hex", "dep:dotenvy", "dep:tracing", "dep:tracing-subscriber",