refactor(compress): move MT parameter update policy to Rust
Move the next-job parameter derivation in ZSTDMT_updateCParams_whileCompressing() behind a scalar Rust projection. Rust now reproduces the existing CCtx-parameter derivation and restores the active frame's saved windowLog; C retains private MT/CCtx layouts, logging, and final writes. Expose the preprocessor-derived block-compressor exclusion mask through the private C boundary so reduced builds keep their authoritative configuration. Add C/Rust layout assertions and focused tests for window preservation and strategy-exclusion routing. Test Plan: - `ulimit -v 41943040; cargo +nightly fmt --manifest-path rust/Cargo.toml --all -- --check` - `ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings` - `ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust/cli/Cargo.toml --all-targets -- -D warnings` - `ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo test --manifest-path rust/cli/Cargo.toml --all-targets` (184 tests) - `ulimit -v 41943040; make -j1` - `ulimit -v 41943040; make -j1 -C tests test` (all upstream tests completed successfully) - Standalone Rust unit linking remains unavailable without the C-owned bridge symbols; integrated build and upstream MT/API coverage passed.
This commit is contained in:
@@ -3945,7 +3945,7 @@ U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat)
|
||||
return ZSTD_rust_params_cycleLog(hashLog, (int)strat);
|
||||
}
|
||||
|
||||
static U32 ZSTD_getCParamsExclusionMask(void);
|
||||
U32 ZSTD_getCParamsExclusionMask(void);
|
||||
|
||||
/** ZSTD_adjustCParams_internal() :
|
||||
* optimize `cPar` for a specified input (`srcSize` and `dictSize`).
|
||||
@@ -4001,7 +4001,7 @@ enum {
|
||||
ZSTD_RUST_PARAMS_EXCLUDE_DFAST = 1u << 6
|
||||
};
|
||||
|
||||
static U32 ZSTD_getCParamsExclusionMask(void)
|
||||
U32 ZSTD_getCParamsExclusionMask(void)
|
||||
{
|
||||
U32 mask = 0;
|
||||
#ifdef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
|
||||
|
||||
Reference in New Issue
Block a user