Files
betterxen/CONTRIBUTING.md
T
atharvranjan 8cab0b1de8 Describe the hybrid direction in README, CONTRIBUTING, docs index and changelog
Only this task's hunks are committed; unrelated local edits to CHANGELOG.md and docs/README.md remain uncommitted.
2026-11-25 14:21:40 -06:00

6.1 KiB

Contributing to BetterXen

BetterXen is hybrid-first Apple Silicon compatibility research built around an externally installed CrossOver, with a preserved but paused independent native implementation. Contributions should improve verified behavior rather than expand untested claims.

Which work is active

The only active development track is the CrossOver-based hybrid architecture in docs/roadmap.md. Issues labelled track: hybrid or track: shared are active; issues labelled track: native and status: deferred are preserved research and are not in the contributor queue. Do not start native work unless a maintainer reclassifies the issue because hybrid development needs it. Start with issues labelled status: ready. The engineering rules in AGENTS.md permit CrossOver, Wine-based infrastructure, Rosetta 2 and D3DMetal (subject to licensing) and allow evaluating DXMT, DXVK, VKD3D-Proton and MoltenVK. CrossOver is proprietary: do not bundle or redistribute any of it, and record the exact versions you test. Before adopting or copying any upstream code, verify its license and provenance and add it to the upstream registry; projects built around leaked or unauthorized game builds are not a source of code. Use the issue templates (hybrid task, bug, research, performance, validation, documentation) and fill in the licensing and provenance section.

Getting started

  • Read README.md and, when present, AGENTS.md, docs/interfaces.md, docs/status.toml and the relevant architecture decisions.
  • Discuss substantial changes in an issue before implementing them; small fixes do not require prior approval.
  • Claim an issue before working on it by replying on it in plain words, after checking its comments for an existing claim. Never claim over someone else. A claim with no pull request after about one week may be taken over with a reply saying so. Coding agents follow the same rules; see "Claiming work before you start" in AGENTS.md.
  • Use a native ARM64 macOS environment with Rust and the appropriate Xcode/Metal tools. LLVM AMDGPU tools are needed for ISA fixture generation; extra tooling depends on the subsystem.
  • Keep changes focused and preserve existing public interfaces unless a change is justified and documented.

Development and verification

When the Cargo workspace exists, run from its root:

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

Follow repository documentation for actual GPU tests, fuzzing, mutation testing and benchmarks. Report commands, versions, pass/fail/skip counts and hardware used. A successful shader compile is not successful GPU execution. Do not report unavailable tools or skipped tests as passes.

For an instruction or compiler change, cite the applicable ISA section, state the exact architecture, document operand and execution-mask semantics, and add tests for encodings, edge cases, unsupported cases and independent expected results. Where applicable, verify the resulting MSL through actual Metal execution. Do not convert unsupported instructions into silent no-ops.

For a performance change, provide reproducible before-and-after results using equivalent inputs, hardware and settings. For a new dependency, explain why it is needed, verify its license and native ARM64 compatibility, and record its provenance.

Research and clean-room policy

Use publicly accessible specifications and authorized materials only. Do not submit leaked SDKs, confidential documentation, firmware, keys, proprietary game binaries or unauthorized shader dumps. Under BetterXen's clean-room policy, anyone who has accessed leaked or confidential Xbox materials must not contribute. Do not post details of restricted material in issues or PRs.

Distinguish desktop RDNA behavior from Xbox-specific behavior. Cite primary sources with exact applicable architectures and record uncertainties using the project's evidence classification when available. Tests on Apple GPUs do not establish verification on Xbox hardware.

BetterXen implements its own Rust guest runtime, decoder, typed IR, shader compiler and native Metal backend from public technical specifications and independently derived tests. Contributions must not copy, port or adapt code, decoder tables, internal metadata or implementation architecture from other emulators. External results can inform test selection. Author the resulting code and fixtures independently.

Before incorporating third-party code, verify per-file license compatibility with GPL-3.0-or-later, record the exact upstream revision and original paths, preserve copyright notices and document changes. Update applicable attribution records. Public visibility alone is not proof of authorization or license compatibility.

Pull requests

  • Branch from the current main branch, keep commits focused, and link relevant issues.
  • Describe what changes and why, link the issue you claimed with Closes #<number>, state which checks you actually ran, and disclose material AI assistance. Separate unverified work from supported behavior.
  • Include a clear explanation, tests and any documentation/status updates. Separate unverified work from supported behavior.
  • Disclose material AI assistance and personally review generated changes. AI output is not an authoritative source, test oracle or substitute for independent review.
  • Never include secrets, personal paths, credentials or private data in patches or logs.
  • Do not claim approval from an independent reviewer unless one has actually reviewed the change.

Sign off each commit under the Developer Certificate of Origin:

git commit -s -m "Describe the change"

Use your configured Git identity and a privacy-preserving email address if desired. Sign-off is your certification of the contribution; do not sign off work on another person's behalf. Contributions are subject to the repository license and any applicable, compatible third-party notices.

For security-sensitive findings, see SECURITY.md. Community expectations are in CODE_OF_CONDUCT.md.