Archive: run the staging implementation on Windows

Add a POSIX compatibility layer for the Windows build of StagedArchive:
directory descriptors are synthetic path handles, file IO uses the CRT
with UTF-8 to wide path conversion, fstatat/fstat/mkdirat/unlinkat/fsync
are emulated, and publication uses MoveFileExW without replace. The
isolated worker keeps its POSIX rlimit path (guarded) and RSS reporting
returns no value on Windows. Allowlist Archive for the Windows target.

Cross-built with x86_64-w64-mingw32 GCC 16.2: Void_Archive and
VoidTests.exe link with no errors. Linux Archive suite: 10/10 pass.

Refs #65
This commit is contained in:
faumaray committed 2026-12-05 16:13:57 +03:00
1 parent bd5488b15b
commit a48c745438
4 files changed
+417 -7

No files matched your search

+8 -5
View File
@@ -108,7 +108,7 @@ recognized and configured like Linux; musl-specific behaviour (subprocess
| CMake / generator | CMake 4.5.0, Ninja 1.13.2 |
| Language | C++26, reflection `yes` |
| Runtime | Wine 11.0 (`wine64`), no native Windows runner available |
| Modules | `Algorithms Async Binary Configuration Containers Core Crypto Data Discovery Fsm Functional Log LogState Math Memory Messaging Observability ObservabilityHooks Scheduler Service System Testing TestingMock Text Time Unicode` |
| Modules | `Algorithms Archive Async Binary Configuration Containers Core Crypto Data Discovery Fsm Functional Log LogState Math Memory Messaging Observability ObservabilityHooks Scheduler Service System Testing TestingMock Text Time Unicode` |
| Observed | configure, compile, `cmake --install`, consume (`TargetProfile.exe` linked); `VoidTests.exe` under Wine: **1364 tests, 1360 passed, 4 skipped, 0 failed** |
Notes from the runtime run:
@@ -117,10 +117,13 @@ Notes from the runtime run:
is Linux-only (`EpollBackend`); on Windows `Driver::create` returns
`IoErrorCode::unsupported` unless the mock backend is selected. A Windows
IO backend (IOCP) is a separate task.
- `Configuration`, `Crypto` and `System` are allowlisted and cross-compile;
`System` links `winmm` for the Win32 audio backend. `Archive` is **not**
allowlisted yet: its staging implementation (`StagedArchive.cpp`) is
POSIX-only (see Void/Library#65).
- `Configuration`, `Crypto`, `System` and `Archive` are allowlisted and
cross-compile; `System` links `winmm` for the Win32 audio backend. Archive's
staging implementation keeps its POSIX logic and runs on Windows through a
compatibility layer (`StagedArchive.cpp`): directory descriptors are
synthetic path handles, file IO uses the CRT, and publication uses
`MoveFileExW` without replace. The isolated archive worker has no rlimits
there, and runtime verification under Wine is still pending.
- Tests that only exercise POSIX APIs carry `// @requires-posix` and are
skipped on Windows; the POSIX process helper is not built there.
- `Observability` links after replacing the namespace-scope