From fa37b1d533192e1f76cb18a22c45b0bbfe44833e Mon Sep 17 00:00:00 2001 From: ddidderr Date: Sun, 19 Jul 2026 09:43:49 +0200 Subject: [PATCH] docs(rust): document stream initialization boundary Document that Rust owns single-threaded and MT stream-initialization policy, including the ordered setup decisions and scalar projections, while C retains private contexts and mutation callbacks. Test Plan: - git diff --cached --check - documentation-only boundary update; code validation is covered by the preceding stream-initialization commits Commit is intentionally unsigned because GPG pinentry hangs in this non-interactive environment. --- rust/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rust/README.md b/rust/README.md index f5070c9e0..8c5bc1a88 100644 --- a/rust/README.md +++ b/rust/README.md @@ -55,6 +55,10 @@ zstd ABI: - `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. + - `zstd_compress` also owns the transparent single-threaded and multithreaded + stream-initialization policy: dictionary selection, parameter resolution, + initial buffer sizing, and the ordered setup decisions are projected into + Rust while C retains the private contexts and mutation callbacks. - `zstd_compress_params` owns the compression-level tables (formerly `clevels.h`), parameter bounds, clamping, validation, table selection, source/dictionary adjustment, and match-state/CDict size estimation. @@ -124,9 +128,10 @@ zstd ABI: tests do not compile. Dictionary-ingestion dispatch, CCtx dictionary/prefix attachment dispatch, the -CLI zstd compression stream loop, the single-threaded buffered/stable stream -state machine, MT outer scheduling and flush policy, MT compression-job stage -sequencing and error flow, sequence-store and block policy, +CLI zstd compression stream loop, single-threaded stream initialization and the +buffered/stable stream state machine, MT stream initialization, MT outer +scheduling and flush policy, MT compression-job stage sequencing and error +flow, sequence-store and block policy, external-sequence/literals block loop, optional-format decompression loops, block decoder wrappers, and decompression result policy now run in Rust. CDict lifecycle, the private dictionary-content loader, reset policy, private