refactor(decompress): remove redundant dictionary bridge
Call the authoritative DDict constructor directly from the Rust decompression policy after converting the shared repr(C) allocator projection. Remove the C forwarding declaration and wrapper so dictionary creation no longer crosses an unnecessary Rust-to-C-to-C boundary, while compile-time size and alignment checks keep the allocator conversion tied to the ABI contract. 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; make -j1` - `ulimit -v 41943040; make -j1 -C tests test` - `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` The integrated checks ran at the combined working-tree tip, including the parallel MT checksum seam that remains as the next commit. Standalone root Rust unit linking remains unavailable because the crate imports C-owned bridge symbols without a Cargo build/link setup.
This commit is contained in:
@@ -142,10 +142,6 @@ size_t ZSTD_rust_decompress_stack(void* dst, size_t dstCapacity,
|
||||
size_t ZSTD_rust_decompress_stack_context(ZSTD_DCtx* dctx,
|
||||
void* dst, size_t dstCapacity,
|
||||
const void* src, size_t srcSize);
|
||||
ZSTD_DDict* ZSTD_rust_create_ddict(const void* dict, size_t dictSize,
|
||||
ZSTD_dictLoadMethod_e dictLoadMethod,
|
||||
ZSTD_dictContentType_e dictContentType,
|
||||
ZSTD_customMem customMem);
|
||||
unsigned ZSTD_rust_legacy_support(void);
|
||||
|
||||
#if ZSTD_TRACE
|
||||
@@ -291,15 +287,6 @@ size_t ZSTD_rust_decompress_stack(void* dst, size_t dstCapacity,
|
||||
#endif
|
||||
}
|
||||
|
||||
ZSTD_DDict* ZSTD_rust_create_ddict(const void* dict, size_t dictSize,
|
||||
ZSTD_dictLoadMethod_e dictLoadMethod,
|
||||
ZSTD_dictContentType_e dictContentType,
|
||||
ZSTD_customMem customMem)
|
||||
{
|
||||
return ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod,
|
||||
dictContentType, customMem);
|
||||
}
|
||||
|
||||
void ZSTD_rust_dctx_trace_view(ZSTD_DCtx* dctx,
|
||||
ZSTD_rustDctxTraceView* out)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user