SRES is a SNES emulator in Rust. See CLAUDE.md for full architecture and command reference.
| Component | Description | How to run |
|---|---|---|
| sres_emulator | Core emulation library | Library crate, no standalone process |
| sres_egui (native) | Desktop GUI (eframe/egui) | cargo run (or cargo run -- rom.sfc) |
| sres_egui (WASM) | Web build via Trunk | cd sres_egui && trunk serve (port 8080) |
No external services (databases, Docker, etc.) are required.
All standard build/test/lint commands are documented in CLAUDE.md. Key ones:
- Build:
cargo build - Run:
DISPLAY=:1 cargo run(headless VM needsDISPLAY=:1) - Lint:
cargo clippy --workspace - Format check:
cargo fmt --check - Tests:
cargo nextest run --workspace(orcargo test) - Full check:
./check-all.sh - Auto-fix:
./fix-all.sh
The docs/ directory contains useful reference information. Read docs/index.md for how to access the information.
- Nightly toolchain required: The project uses
build-std(rebuilds stdlib from source), which requires the nightly channel specified inrust-toolchain.toml. Therust-srccomponent must be installed. DISPLAY=:1: When running the GUI in a headless Cloud Agent VM, setDISPLAY=:1so eframe can connect to the X11 server.libxkbcommon-x11: The eframe/egui native build requireslibxkbcommon-x11-0at runtime. If the emulator panics with "Library libxkbcommon-x11.so could not be loaded", install it:sudo apt-get install -y libxkbcommon-x11-0.- Git LFS: Test ROMs (
.sfc), trace logs (.xz), and reference images (.png) are stored in Git LFS. If LFS objects are unavailable (404 on the server), ROM-based integration tests will still pass using assembled test ROMs (viaxa65), but some tests may be skipped. xa65assembler: Required by some test ROM assembly. Installed viasudo apt-get install -y xa65.cargo-nextest: The preferred test runner. Install viacurl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-$HOME/.cargo}/bin.