COCO-8 (or 👻-8) is a fantasy VM for games and creative coding. COCO-8 runs on Wasm and it's written in Rust.
COCO-8 is made of these parts:
-
coco-core
, the virtual CPU. It is basically Uxn, as documented (COCO-8 follows the documented spec, not the reference implementation of Uxn). -
Devices, which interface with the CPU and provide input / output with peripherals or other systems (e.g. video, audio, controller input, etc.).
-
A web-based GUI, for users to load and run COCO-8 roms.
You need Rust and Cargo in your system. You can get them with rustup
.
You will also need the wasm-bindgen
CLI tool.
cargo install wasm-bindgen-cli
The build.sh
shell script builds the Rust code and generates ESM modules inside coco-ui/vendor
.
./build.sh
To run COCO-8, you just need to start a local web server in coco-ui
.
If you have npm in your system:
npx http-server coco-ui