Thanks for your interest in contributing.
RustySNES is a pure-Rust workspace.
- Install rustup.
- The toolchain is pinned in
rust-toolchain.toml(Rust 1.96, edition 2024);rustupauto-installs it, including thewasm32-unknown-unknownandthumbv7em-none-eabihftargets the gates exercise. cargo check --workspaceto verify the workspace compiles.cargo test --workspaceto run the unit and integration tests.cargo test --workspace --features test-romsto add the test-ROM oracle.
On Linux, the frontend crate pulls in the wgpu / winit / cpal system deps:
# Debian / Ubuntu (matches .github/actions/rust-setup's linux-frontend-deps step exactly)
sudo apt-get install -y libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
libasound2-dev libudev-dev libx11-dev libxcursor-dev libxrandr-dev libxi-dev
# Arch / CachyOS
sudo pacman -S --needed libxkbcommon wayland alsa-lib systemd-libs libx11 libxcursor libxrandr libxi- Pick a ticket from
to-dos/(or open an issue first if your work isn't already represented there). - Create a branch:
<type>/<short-description>(e.g.,feat/cpu-immediate-addressing,fix/ppu-scroll-wrap). - Make changes. Keep commits focused.
- Run the local quality gate before pushing.
- Open a PR. Reference the ticket(s) and any relevant
docs/files.
Before opening a PR, ensure every gate below is green. fmt/clippy/cargo test --workspace
are also enforced by CI on every PR (ci.yml's lint/test-light jobs, v1.5.0 "Bedrock") —
running them locally first is still the fast feedback loop, not a redundant step.
-
cargo fmt --all --checkpasses -
cargo clippy --workspace --all-targets -- -D warningspasses -
cargo test --workspacepasses -
cargo build -p rustysnes-core --target thumbv7em-none-eabihf --no-default-featurespasses (the chip stack staysno_std) -
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-depspasses - New public items have rustdoc (
missing_docsis a workspace lint) - User-visible changes are noted in
CHANGELOG.mdunder[Unreleased]
Never run cargo clippy --all-features: the scripting (native mlua) and
script-wasm (wasm piccolo) backends are mutually exclusive, so the feature
set cannot resolve. Use the explicit per-feature jobs instead.
- New subsystems get a doc in
docs/. - Architecture-affecting changes update
docs/architecture.md. - A chip-behavior change touches both the chip code and the chip's
docs/<subsystem>.md— they drift apart easily; don't let them. - User-visible changes are noted in
CHANGELOG.mdunder[Unreleased]. - Ticket completion is reflected in the relevant
to-dos/sprint file.
Use Conventional Commits:
<type>(<scope>): <subject>.
Types: feat, fix, docs, refactor, test, chore, perf, build,
ci. Keep the imperative subject at or under 72 characters; an optional body
explains the why (not the what — the diff shows the what). No emojis in code,
comments, or commits (project policy).
- One reviewer minimum; two for changes to
docs/architecture.mdor cross-subsystem refactors. - Reviewers focus on correctness, design, and adherence to the relevant
docs/specification. - Discussion is preferred over deferral; if a comment can't be resolved in review, file a follow-up ticket explicitly.
scripts/snesdev_wiki_mirror.py mirrors https://snes.nesdev.org/wiki/ into a gitignored
snesdev_wiki/ directory — 180 pages and 32 images, about 7 MB — so the hardware reference is
greppable offline. This is the SNES counterpart to the nesdev_wiki/ mirror RustyNES keeps.
python3 scripts/snesdev_wiki_mirror.py # full mirror (re-runnable)
python3 scripts/snesdev_wiki_mirror.py --dry-run # list pages, fetch nothing| Path | Contents |
|---|---|
snesdev_wiki/INDEX.md |
generated table of contents, grouped by namespace |
snesdev_wiki/output/*.md |
Markdown conversions — the form you actually read, with internal links rewritten to resolve locally |
snesdev_wiki/wikitext/*.wiki |
raw wikitext, the most faithful source form |
snesdev_wiki/html/*.xhtml |
rendered HTML as the wiki serves it |
snesdev_wiki/images/ |
every image the pages reference |
The upstream text is contributor-licensed. The mirror is gitignored and must never be
committed or vendored into this MIT/Apache tree — the same posture ref-proj/ takes for
reference emulator source.