Crust8 is a fast, portable, and modular CHIP-8 emulator written in Rust. It aims to provide an accurate and maintainable implementation of the CHIP-8 virtual machine, with a focus on code clarity, performance, and extensibility. Whether you're a retro gaming enthusiast or a developer interested in emulation, Crust8 makes it easy to run CHIP-8 programs on modern hardware.
- Accurate Emulation: Faithful implementation of the CHIP-8 instruction set.
- Modular Design: Separates core emulation logic from the desktop frontend for flexibility.
- Cross-Platform: Built with Rust for portability across platforms.
- Sample ROMs: Includes a collection of public-domain CHIP-8 ROMs for testing.
- Developer-Friendly: Comprehensive test suite, linting, and formatting tools.
The repository is organized as a Cargo workspace:
crust8_core/: Core CHIP-8 emulator logic, independent of any frontend.desktop/: Desktop frontend for running CHIP-8 games with a graphical interface.roms/: Sample CHIP-8 ROMs for testing and development.
- Rust (stable, latest version recommended)
- just (optional, for simplified build and development commands)
-
Clone the repository:
git clone https://github.com/yourusername/crust8.git cd crust8 -
Install Rust if not already installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
(Optional) Install
justfor streamlined commands:cargo install just
Crust8 uses just for common development tasks. To list available commands, run:
justjust build-releasejust build-debugTo run a CHIP-8 ROM using the desktop frontend:
just run-desktop ./roms/pong.ch8Replace ./roms/pong.ch8 with the path to your desired ROM file.
Run the full test suite to verify emulator correctness:
just testEnsure consistent code style and catch potential issues with the following commands:
just fmt-checkjust fmtjust lintCrust8 is licensed under the MIT License. See the LICENSE file for details.
- Inspired by the CHIP-8 community and its rich history of emulators.
- Built with Rust and the amazing Cargo ecosystem.