/nes-rust

NES emulator written in Rust + WASM

Primary LanguageRustMIT LicenseMIT

nes-rust

nes-rust is a NES emulator written in Rust.

Online Singleplay Demo

Online Multiplay Demo / Video

Screenshots

nestest

nestest

Sgt. Helmet Training Day

Sgt. Helmet Training Day

Features

  • Audio support with SDL2 / WebAudio
  • WebAssembly support
  • Remote multiplay support with WebRTC

How to build and run

Standalone

You need SDL2. Refer to Rust-SDL2 Readme for the detail.

$ git clone https://github.com/takahirox/nes-rust.git
$ cd nes-rust
$ # install or setup SDL2
$ cargo build --release
$ cargo run --release path_to_rom

Web (WebAssembly)

You need wasm-bindgen client. Refer to the document for the detail.

$ git clone https://github.com/takahirox/nes-rust.git
$ cd nes-rust
$ # install wasm-bindgen
$ cargo build --release --lib --target wasm32-unknown-unknown
$ wasm-bindgen ./target/wasm32-unknown-unknown/release/nes_rust.wasm --out-dir ./wasm/ --target web --no-typescript
# Boot up local web server and access index.html via the server