feat(dict): port the FastCover trainer to Rust

Move FastCover parameter validation, corpus preparation, optimization, and
dictionary training into Rust. Retain the C source as a static-linking ABI
anchor and register the implementation with the compression dictionary-builder
feature set.

Test Plan:
- rustfmt +nightly --check --edition 2021 rust/src/dict_builder_fastcover.rs rust/src/lib.rs
- RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo clippy --manifest-path rust/Cargo.toml --all-targets --no-default-features --features compression,dict-builder -- -D warnings
- FastCover focused Rust tests and deterministic C-reference harness
- git diff --cached --check
This commit is contained in:
2026-07-12 10:40:51 +02:00
parent 60877175a4
commit b8ccfd7b87
3 changed files with 1080 additions and 751 deletions
+2
View File
@@ -8,6 +8,8 @@ pub mod debug;
#[cfg(feature = "dict-builder")]
pub mod dict_builder_cover;
#[cfg(all(feature = "compression", feature = "dict-builder"))]
pub mod dict_builder_fastcover;
#[cfg(all(feature = "compression", feature = "dict-builder"))]
pub mod dict_builder_zdict;
#[cfg(feature = "dict-builder")]
pub mod divsufsort;