From 7fb9f594f831c6c4b14b31833c47fafef711865c Mon Sep 17 00:00:00 2001 From: "MK (fengmk2)" Date: Sat, 10 Oct 2026 15:29:13 +0800 Subject: [PATCH] chore(cache): disable unused zstd default features The cache only streams archives that vt writes itself, so zstd's default `legacy` decoders (pre-1.0 frame formats), `zdict_builder`, and `arrays` features are never used. The legacy decoders were still linked because libzstd's streaming decoder calls them whenever legacy support is compiled in. Disabling the defaults removes 165,408 bytes from the Vite+ NAPI binding on darwin-arm64. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cfb40df9a..5623f1301 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -195,7 +195,8 @@ winsafe = { version = "0.0.27" } xxhash-rust = "0.8.15" ntest = "0.9.5" terminal_size = "0.4" -zstd = "0.13" +# The cache only reads archives it wrote, so zstd's default legacy (pre-1.0) decoders and dictionary builder are unused. +zstd = { version = "0.13", default-features = false } [workspace.metadata.cargo-shear] ignored = [