docs(rust): record latest ownership boundaries

Document the advanced one-shot begin/end seam, MT job-table teardown order, decompression heap-mode policy, and file-removal status policy so the migration boundary stays synchronized with the implementation.

Test Plan:

- git diff --cached --check
This commit is contained in:
2026-07-21 09:37:27 +02:00
parent 92594574c2
commit d8403672d5
+10 -5
View File
@@ -68,6 +68,9 @@ zstd ABI:
The public end-of-frame path and the `ZSTD_compress2_c` fallback also use The public end-of-frame path and the `ZSTD_compress2_c` fallback also use
Rust-owned orchestration boundaries while C retains the context reset, Rust-owned orchestration boundaries while C retains the context reset,
stream adapter, checksum/epilogue, and trace callbacks. stream adapter, checksum/epilogue, and trace callbacks.
Public advanced one-shot compression now uses the same Rust-owned
begin-then-end ordering boundary while C retains the private begin/end
callbacks.
Public frame-progression dispatch is Rust-owned as well; C projects the Public frame-progression dispatch is Rust-owned as well; C projects the
scalar single-thread inputs and keeps the private MT context behind a scalar single-thread inputs and keeps the private MT context behind a
callback. callback.
@@ -105,7 +108,9 @@ zstd ABI:
accounting. Rust also owns frame-block preparation ordering and the MT accounting. Rust also owns frame-block preparation ordering and the MT
serial turn/skip policy, including LDM-before-checksum sequencing; C serial turn/skip policy, including LDM-before-checksum sequencing; C
callbacks retain the private match-state window, workspace operations, callbacks retain the private match-state window, workspace operations,
synchronization, LDM state, and checksum state. synchronization, LDM state, and checksum state. Rust also owns the normal
job-table teardown order, while C retains the private job storage and
synchronization callbacks.
- Dictionary support - Dictionary support
- `zstd_ddict` owns, loads, copies, and references decode dictionaries. - `zstd_ddict` owns, loads, copies, and references decode dictionaries.
- Legacy decoding - Legacy decoding
@@ -122,8 +127,8 @@ zstd ABI:
- `zstd_decompress` owns the public decompression context, one-shot, - `zstd_decompress` owns the public decompression context, one-shot,
dictionary, parameter, and streaming state machines. Its C shim retains dictionary, parameter, and streaming state machines. Its C shim retains
the configuration-dependent context layout and platform details, plus the configuration-dependent context layout and platform details, plus
legacy and trace leaves; Rust owns the no-forward-progress threshold legacy and trace leaves; Rust owns the no-forward-progress threshold and
policy, decoder storage allocation, custom memory dispatch, and the heap-mode policies, decoder storage allocation, custom memory dispatch, and the
`ZSTD_copyDCtx` prefix copy up to the projected `inBuff` field. `ZSTD_copyDCtx` prefix copy up to the projected `inBuff` field.
- Command-line frontend - Command-line frontend
- `zstd_cli` owns the Rust parser, safety policy, and dispatch. It is built - `zstd_cli` owns the Rust parser, safety policy, and dispatch. It is built
@@ -136,8 +141,8 @@ zstd ABI:
optional-format decompression loops, decompression result policy/final optional-format decompression loops, decompression result policy/final
accounting, both shared- and separate-destination multi-file compression accounting, both shared- and separate-destination multi-file compression
schedulers, and both shared- and separate-destination decompression schedulers, and both shared- and separate-destination decompression
schedulers. Rust also owns the scalar compression metadata-transfer schedulers. Rust also owns the scalar compression metadata-transfer and
decision; C retains the private stat probe, metadata operations, file-removal status policies; C retains the private stat probe, metadata operations,
destination-name construction, and the private file/resource/format destination-name construction, and the private file/resource/format
callbacks for these scheduler boundaries. callbacks for these scheduler boundaries.
Rust already owns the file preference policy, filename decisions, Rust already owns the file preference policy, filename decisions,