diff --git a/rust/README.md b/rust/README.md index bc5fe66f4..1004593bf 100644 --- a/rust/README.md +++ b/rust/README.md @@ -47,7 +47,9 @@ zstd ABI: sequence-store builder and no-compress fallback. Rust also owns the frame-chunk block loop, including block sizing, target/split/internal dispatch, output accounting, and frame-state updates; C supplies the - private state-preparation and block-compression callbacks. + private state-preparation and block-compression callbacks. The + external-sequence-and-literals block loop is Rust-owned as well; C retains + only its CCtx-dependent sequence-conversion callback. - `zstd_compress_frame` serializes frame headers, skippable frames, and the last empty block; it takes scalar frame parameters so the C-owned `ZSTD_CCtx_params` layout never crosses the language boundary. @@ -76,8 +78,9 @@ zstd ABI: - `threading` provides platform pthread wrappers required by zstd headers. - `pool` implements the bounded worker pool used by multithreaded compression. - The `zstdmt_compress` integration keeps job descriptors and synchronization - private to C while Rust owns input-retention scans and pending-output - decisions through scalar job projections. + private to C while Rust owns input-retention scans, reusable input-range + overlap decisions, and pending-output decisions through scalar job + projections. - Dictionary support - `zstd_ddict` owns, loads, copies, and references decode dictionaries. - Legacy decoding @@ -89,7 +92,8 @@ zstd ABI: - `zstd_decompress_block` decodes literal and sequence sections, maintains FSE/Huffman repeat state, executes compressed-block sequences, and selects the short or long sequence decoder from projected configuration and history - state. C retains the decoder-context layout and configuration projection. + state. C retains the decoder-context layout and configuration projection; + the public and fullbench block-decoder wrappers are Rust-owned. - `zstd_decompress` owns the public decompression context, one-shot, dictionary, parameter, and streaming state machines. Its C shim retains the configuration-dependent context layout and platform details, plus @@ -100,10 +104,11 @@ zstd ABI: by the separate `cli/` static-library package only for program archives, so library builds do not acquire program-only dependencies. The C `fileio` layer retains the format-specific codec callbacks and metadata, - while Rust owns the mixed-format probe/dispatch loop and gzip, xz/lzma, - and lz4 codec leaves. Rust already owns the file - preference policy, filename decisions, source/destination opening, - dictionary buffers, asynchronous I/O pools, and pass-through copy leaf. + while Rust owns the mixed-format probe/dispatch loop, decompression result + policy/final accounting, and gzip, xz/lzma, and lz4 codec leaves. Rust + already owns the file preference policy, filename decisions, + source/destination opening, dictionary buffers, asynchronous I/O pools, + and pass-through copy leaf. - `timefn` provides the monotonic nanosecond clock behind `UTIL_time_t`, while `benchfn` owns the benchmark run/timing loop (`BMK_benchFunction`, `BMK_benchTimedFn`) and `benchzstd` owns benchmark orchestration and @@ -115,10 +120,12 @@ zstd ABI: Generic high-level frame-compression state-machine orchestration and the remaining multithreaded scheduling/outer-flush orchestration are still C. The -frame epilogue, produced-output flush policy, MT job-creation policy, and -gzip/xz/lzma/lz4 codec leaves now run in Rust. The remaining C paths must move -before the rewrite is complete. Keeping that boundary explicit prevents a -passing hybrid build from being mistaken for the final all-Rust result. +frame epilogue, produced-output flush policy, MT job-creation policy, +reusable MT input-range policy, external-sequence/literals block loop, block +decoder wrappers, decompression result policy, and gzip/xz/lzma/lz4 codec +leaves now run in Rust. The remaining C paths must move before the rewrite is +complete. Keeping that boundary explicit prevents a passing hybrid build from +being mistaken for the final all-Rust result. ## Legacy decoding