feat(fileio): port async pools to Rust
Replace programs/fileio_asyncio.c with a declaration-only shim and register Rust's async file-I/O implementation in the library archive. Preserve the C ABI for pool and job contexts, including DEBUGLEVEL pointer-based pthread wrappers, and select separate Rust build configurations for those layouts. Keep ordered-read queue state locked while waiting, drain queued work before shutdown frees job buffers, and use platform large-file seeks for sparse writes. Test Plan: - `cargo test --no-default-features --lib fileio_asyncio` (7 passed). - `cargo test --no-default-features --features debug-pthread --lib fileio_asyncio` (7 passed). - `cargo check --all-targets`, clippy library/benches/tests, and nightly fmt check (passed). - Threaded program build and README round-trip (passed). - `make -C tests poolTests` and `./tests/poolTests` (passed). - Current C shim object defines no `AIO_*` symbols; the Rust archive exports all 20 declarations. - Full standalone all-target Rust tests and the default CLI archive rebuild remain affected by unrelated C/Rust integration and another worker's in-progress benchmark changes.
This commit is contained in:
@@ -13,6 +13,8 @@ decompression = []
|
||||
dict-builder = []
|
||||
huf-force-decompress-x1 = []
|
||||
huf-force-decompress-x2 = []
|
||||
# POSIX DEBUGLEVEL >= 1 replaces pthread objects in the C ABI with pointers.
|
||||
debug-pthread = []
|
||||
# Legacy-format decoders (zstd v0.1 .. v0.7). Never default features: the
|
||||
# build systems map ZSTD_LEGACY_SUPPORT=N to the features for versions >= N,
|
||||
# exactly mirroring which lib/legacy/zstd_v0N.c files the C build compiles.
|
||||
|
||||
Reference in New Issue
Block a user