mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 22:50:44 +00:00
Rebases onto origin/main and retires the paused in-tree native-first workspace, legacy scripts, legacy CI, and native-only docs per ADR 0006 (preserving full history permanently at Git tag native-first-final). Addresses all maintainer review findings on PR #406: - Isolate CrossOver/Wine child process environment in bx-cli (env_clear + minimal allowlist + opt-in --inherit-env, with unit tests) - Replace naive objdump grep in scripts/build-shims.sh with strict PE Export Directory verification (exact names, ordinals, forwarders, 0 extra exports, 0 forbidden MinGW imports across all 16 DLLs / 102 exports) - Restore global * @MacosPorters/maintainers fallback in .github/CODEOWNERS alongside per-track rules - Restore independent-verification, claims/evidence-class, provenance-first, and contributor clean-room protections in AGENTS.md - Unify docs/roadmap.md, CONTRIBUTING.md, README.md, docs/README.md, THIRD_PARTY_NOTICES.md, and CHANGELOG.md around Milestones M0-M6 and ADR 0006 Signed-off-by: ates <ahmetrizaates@hotmail.com>
4.4 KiB
4.4 KiB
Parallel Track Architecture & Contributor Handoff Guide
BetterXen is organized so 5 to 8+ contributors can develop the CrossOver-based Apple Silicon compatibility stack concurrently via Git and GitHub Issues without merge conflicts.
Repository Layout
| Directory | Track | Language / Build | Purpose |
|---|---|---|---|
abi/ |
Shared (frozen) | C headers + .def |
Cross-DLL contracts (bx_log.h, bx_config.h, bx_xmem_internal.h, bx_shader_bridge.h) and canonical DLL export lists |
launcher/ |
Track A | Rust (aarch64-apple-darwin) |
Native ARM64 macOS CLI (bx-cli), PE32+ static probe (bx-probe), JSONL trace aggregator (bx-telemetry) |
shims/runtime_veh/ |
Track A | C++20 (mingw-w64) |
bx_runtime_veh.dll: clwb VEH handler, adcx/adox tripwire, Lockhart/Anaconda config, JSONL trace logger |
shims/win32_bridge/ |
Track A | C++20 (mingw-w64) |
PSM AppNotify stubs + ext-ms-win-rtcore-ntuser-* → user32.dll forwarders |
shims/xmem/ |
Track B | C++20 (mingw-w64) |
xmem.dll: physical/virtual/scatter memory allocator, __XMemAllocationHooks__, 16 GB Lockhart cap |
shims/xcrdapi/ |
Track B | C++20 (mingw-w64) |
XCRDAPI.dll: DirectStorage async I/O factory, queues, and decompression |
shims/d3d12_xs/ |
Track C1 | C++20 (mingw-w64) |
d3d12_xs.dll: Xbox D3D12 COM proxy over Wine d3d12.dll (D3DMetal 3.0), PresentX, placed resources |
shims/xg_xs/ |
Track C2 | C++20 (mingw-w64) |
xg_xs.dll: RDNA 2 texture tile addressing & swizzle layout computer |
shims/ffx_bvh_hooks/ |
Track C3 | C++20 (mingw-w64) |
Optional PC FidelityFX/MetalFX upscaler shim & BVH4 rehydration → DXR live rebuild bridge |
shader-transpiler/ |
Track D | Rust (aarch64 / C ABI) |
DXBC/DXIL/ACCC/FSPX shader classifier, RDNA 2 → DXIL/MSL transpiler (M2 gate), shader cache, d3dmetal-native harness |
shims/xgameruntime/ |
Track E1 | C++20 (mingw-w64) |
xgameruntime.dll: offline GDK runtime (XTaskQueue, XAsync, XUser, XStore, XSystem, XPersistentLocalStorage) |
shims/gameinput/, shims/audio/ |
Track E2 | C++20 (mingw-w64) |
GameInput.dll ordinal 1 adapter + AcpHal.dll, xapu.dll, chad.dll audio/DSP shims |
tests/conformance/ |
Track F | C++20 (mingw-w64) |
Clean-room synthetic PE32+ test executables verifying each shim under CrossOver/Wine |
(The earlier native-first research workspace was retired from main per ADR 0006 and remains permanently accessible at Git tag native-first-final.)
Milestones (M0 → M6)
- M0 — Repo, ABI & Cross-Build: One-command ARM64 + x86-64 PE32+ build, export verification, and
test_veh_clwb.exepassing under CrossOver + Rosetta 2 (ROSETTA_ADVERTISE_AVX=1). - M1 — Boot to
D3D12XboxCreateDevice: Zero missing imports; all 16 shim DLLs load cleanly; auto-logging COM proxy captures startup call traces. - M2 — First Frame & Shader Format Gate: Present real frames through D3DMetal 3.0 (
PresentX→IDXGISwapChain3::Present) and classify runtime shaders (DXILfast path vs.ACCC/FSPXRDNA 2 transpilation). - M3 — Full Shaders, Streaming & Texture Correctness: Async DirectStorage decompression, accurate RDNA 2
xg_xstiling/deswizzling, full shader pipeline. - M4 — 3D World, Ray Tracing & Input: BVH4 rehydration → live D3DMetal 3.0 DXR build, FidelityFX/MetalFX upscaling shim, full
GameInputcontroller/KB/M mapping. - M5 — Real Audio, Saves & Stability: Software audio/DSP decoding behind
AcpHal/xapu/chad,PersistentLocalStoragesaves, multi-hour soak testing. - M6 — Shader Cache, 16 GB Optimization & Polish: Persistent disk PSO/shader cache, Lockhart 16 GB unified memory tuning, Metal System Trace optimization, Swift launcher UI.
Zero-Conflict Git & Issue Protocol
- ABI-first: Any cross-track header or
.defchange lands first in a small[ABI]PR touching onlyabi/. - Branch naming:
track-<a..f>/<issue>-<slug>offmain, squash-merged daily. - Exclusive file scope: Every issue lists the exact directories it may edit (using
.github/ISSUE_TEMPLATE/track-handoff.yml). Never edit another track's folder in a feature PR. - Local verification:
cargo fmt --all -- --check cargo clippy --workspace --all-targets -- -D warnings cargo test --workspace scripts/build-shims.sh