From 19cef882dea9a52f495775964a3aa2950f46663e Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Tue, 11 Nov 2025 14:34:35 +0000 Subject: [PATCH] Make serde dependency optional Signed-off-by: Nico Burns --- Cargo.toml | 2 +- html5ever/Cargo.toml | 1 + markup5ever/Cargo.toml | 3 +++ rcdom/Cargo.toml | 2 +- web_atoms/Cargo.toml | 3 +++ xml5ever/Cargo.toml | 1 + 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 83217681..3b776410 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ log = "0.4" new_debug_unreachable = "1.0.2" phf = "0.13" phf_codegen = "0.13" -string_cache = "0.9.0" +string_cache = { version = "0.9.0", default-features = false } string_cache_codegen = "0.6.1" utf-8 = "0.7" diff --git a/html5ever/Cargo.toml b/html5ever/Cargo.toml index bdd8210d..d31cc724 100644 --- a/html5ever/Cargo.toml +++ b/html5ever/Cargo.toml @@ -14,6 +14,7 @@ rust-version.workspace = true [features] trace_tokenizer = [] +serde = ["markup5ever/serde"] [dependencies] markup5ever = { workspace = true } diff --git a/markup5ever/Cargo.toml b/markup5ever/Cargo.toml index e46294a3..764f9a0a 100644 --- a/markup5ever/Cargo.toml +++ b/markup5ever/Cargo.toml @@ -13,6 +13,9 @@ rust-version.workspace = true [lib] path = "lib.rs" +[features] +serde = ["web_atoms/serde"] + [dependencies] web_atoms = { workspace = true } tendril = { workspace = true } diff --git a/rcdom/Cargo.toml b/rcdom/Cargo.toml index 51436e76..4e994470 100644 --- a/rcdom/Cargo.toml +++ b/rcdom/Cargo.toml @@ -16,7 +16,7 @@ path = "lib.rs" [dependencies] html5ever = { workspace = true } -markup5ever = { workspace = true } +markup5ever = { workspace = true, features = ["serde"]} xml5ever = { workspace = true } tendril = { workspace = true } diff --git a/web_atoms/Cargo.toml b/web_atoms/Cargo.toml index 7e5565eb..2b4501c1 100644 --- a/web_atoms/Cargo.toml +++ b/web_atoms/Cargo.toml @@ -14,6 +14,9 @@ rust-version.workspace = true [lib] path = "lib.rs" +[features] +serde = ["string_cache/serde_support"] + [dependencies] string_cache = { workspace = true } phf = { workspace = true } diff --git a/xml5ever/Cargo.toml b/xml5ever/Cargo.toml index e70c4997..aecc5540 100644 --- a/xml5ever/Cargo.toml +++ b/xml5ever/Cargo.toml @@ -16,6 +16,7 @@ rust-version.workspace = true [features] trace_tokenizer = [] +serde = ["markup5ever/serde"] [dependencies] markup5ever = { workspace = true }