Skip to content

Commit 10b43d8

Browse files
authored
Merge pull request #11 from denniskempin/cursor/development-environment-setup-f835
Add AGENTS.md with Cursor Cloud development environment instructions
2 parents 46225f6 + 1df735a commit 10b43d8

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# AGENTS.md
2+
3+
## Cursor Cloud specific instructions
4+
5+
### Project Overview
6+
7+
SRES is a SNES emulator in Rust. See `CLAUDE.md` for full architecture and command reference.
8+
9+
### Services
10+
11+
| Component | Description | How to run |
12+
|---|---|---|
13+
| **sres_emulator** | Core emulation library | Library crate, no standalone process |
14+
| **sres_egui (native)** | Desktop GUI (eframe/egui) | `cargo run` (or `cargo run -- rom.sfc`) |
15+
| **sres_egui (WASM)** | Web build via Trunk | `cd sres_egui && trunk serve` (port 8080) |
16+
17+
No external services (databases, Docker, etc.) are required.
18+
19+
### Common commands
20+
21+
All standard build/test/lint commands are documented in `CLAUDE.md`. Key ones:
22+
23+
- **Build**: `cargo build`
24+
- **Run**: `DISPLAY=:1 cargo run` (headless VM needs `DISPLAY=:1`)
25+
- **Lint**: `cargo clippy --workspace`
26+
- **Format check**: `cargo fmt --check`
27+
- **Tests**: `cargo nextest run --workspace` (or `cargo test`)
28+
- **Full check**: `./check-all.sh`
29+
- **Auto-fix**: `./fix-all.sh`
30+
31+
### Non-obvious caveats
32+
33+
- **Nightly toolchain required**: The project uses `build-std` (rebuilds stdlib from source), which requires the nightly channel specified in `rust-toolchain.toml`. The `rust-src` component must be installed.
34+
- **`DISPLAY=:1`**: When running the GUI in a headless Cloud Agent VM, set `DISPLAY=:1` so eframe can connect to the X11 server.
35+
- **`libxkbcommon-x11`**: The eframe/egui native build requires `libxkbcommon-x11-0` at runtime. If the emulator panics with "Library libxkbcommon-x11.so could not be loaded", install it: `sudo apt-get install -y libxkbcommon-x11-0`.
36+
- **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 (via `xa65`), but some tests may be skipped.
37+
- **`xa65` assembler**: Required by some test ROM assembly. Installed via `sudo apt-get install -y xa65`.
38+
- **`cargo-nextest`**: The preferred test runner. Install via `curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-$HOME/.cargo}/bin`.

0 commit comments

Comments
 (0)