Skip to content

Latest commit

 

History

History
21 lines (19 loc) · 692 Bytes

README.md

File metadata and controls

21 lines (19 loc) · 692 Bytes

emul8: a simple chip-8 emulator

Powered by Rust and WGPU, emul8 is my first attempt at an emulator. It can compile for desktop platforms or the web!

emul8 running pong

Compiling for the web

To compile for the web, build for the target wasm32_unknown_unknown: Set the RUSTFLAGS environment variable. In PowerShell, for example:

$env:RUSTFLAGS = "--cfg=web_sys_unstable_apis"

Then you can build:

cargo build --no-default-features --target wasm32-unknown-unknown

Finally, generate wasm bindings:

wasm-bindgen --out-dir web --web target/wasm32-unknown-unknown/debug/emul8.wasm

Now, serve the web folder, and it should run!