feat(compress): port multithreaded resource pools
Move the reusable buffer and compression-context pools behind a Rust implementation with a narrow C ABI adapter. The scheduler, job table, serial LDM state, and stream orchestration remain in C until their private layouts are ported. Keep context types opaque across Rust modules so the pool bridge does not depend on private C layout declarations. This also keeps the existing custom allocator and pool replacement contracts intact. Test Plan: - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo test --manifest-path rust/Cargo.toml zstdmt_compress - make -B -C lib lib-mt - git diff --cached --check
This commit is contained in:
@@ -596,15 +596,8 @@ fn best_snapshot(slot: &BestSlot) -> BestSnapshot {
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct ZSTD_CCtx {
|
||||
_private: [u8; 0],
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct ZSTD_CDict {
|
||||
_private: [u8; 0],
|
||||
}
|
||||
type ZSTD_CCtx = c_void;
|
||||
type ZSTD_CDict = c_void;
|
||||
|
||||
unsafe extern "C" {
|
||||
fn ZDICT_finalizeDictionary(
|
||||
|
||||
Reference in New Issue
Block a user