fix(build): gate CLI dictionary builder by feature

Keep dictionary-training code out of compressor-only and decompressor-only CLI
archives, where its ZDICT symbols are intentionally absent. Add a dedicated
Rust CLI archive for zstd-dictBuilder, enable the builder feature only for the
full and dictionary-builder programs, and make reduced-feature help use the
feature-independent max-level helper.

Test Plan:
- cargo test --manifest-path rust/cli/Cargo.toml --lib -- --test-threads=1 (158 passed)
- cargo test --manifest-path rust/cli/Cargo.toml --no-default-features --features cli,compression,dict-builder --lib -- --test-threads=1 (124 passed)
- cargo clippy --manifest-path rust/cli/Cargo.toml --lib -- -D warnings
- cargo clippy --manifest-path rust/cli/Cargo.toml --no-default-features --features cli,compression,dict-builder --lib -- -D warnings
- make -C programs -j2 zstd zstd-small zstd-frugal zstd-decompress zstd-compress zstd-dictBuilder
- git diff --check
This commit is contained in:
2026-07-18 17:36:24 +02:00
parent f7a2576761
commit e557549ff4
4 changed files with 20 additions and 8 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ mod benchzstd;
#[cfg(any(feature = "benchmark", feature = "helpers"))]
#[path = "../../src/datagen.rs"]
mod datagen;
#[cfg(feature = "cli")]
#[cfg(all(feature = "cli", feature = "dict-builder"))]
#[path = "../../src/dibio.rs"]
mod dibio;
#[cfg(feature = "cli")]