feat(compress): port the CCtx parameter object API to Rust

Move CCtx parameter reset/init, parameter set/get, and external sequence
producer registration to Rust with a private C-layout mirror. Keep allocation,
advanced initialization, bounds policy, and context-dependent APIs in C, and
retain C layout assertions and helper bridges for the shared object.

Test Plan:
- rustfmt +nightly --check --edition 2021 rust/src/zstd_compress_params_api.rs rust/src/lib.rs
- RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo test --manifest-path rust/Cargo.toml --no-default-features --features compression zstd_compress_params_api
- RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo clippy --manifest-path rust/Cargo.toml --all-targets --no-default-features --features compression -- -D warnings
- make -B -C lib libzstd.a V=1
- git diff --cached --check
This commit is contained in:
2026-07-12 10:48:40 +02:00
parent 49454dada9
commit 0d3dae8fd8
3 changed files with 1107 additions and 424 deletions
+2
View File
@@ -42,6 +42,8 @@ pub mod zstd_compress_literals;
#[cfg(feature = "compression")]
pub mod zstd_compress_params;
#[cfg(feature = "compression")]
pub mod zstd_compress_params_api;
#[cfg(feature = "compression")]
pub mod zstd_compress_sequences;
#[cfg(feature = "compression")]
pub mod zstd_compress_stats;