Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Setting Up

Requirements

  • A recent stable Rust toolchain, managed with rustup. Install rustfmt and clippy with rustup component add rustfmt clippy.
  • On Linux: sudo apt install libudev-dev libssl-dev pkg-config clang.
  • pnpm and typeshare (cargo install typeshare-cli) on your PATH. The dies-webui build script uses them to regenerate the TypeScript bindings and build the frontend bundle.

Running

Dies is a plain Cargo workspace. The dies-cli crate is the entry point; it also builds the strategy binary for you.

cargo run

Open the web UI at http://localhost:5555.

For a headless, faster-than-realtime match between two strategies (no UI, deterministic for a given seed):

cargo run -- self-play --blue-strategy concerto --yellow-strategy concerto

Web UI development

Run pnpm install in webui/ once, then start mprocs from the repository root. It runs the Vite dev server (with hot module reloading) next to dies --watch.

Tests and lints

cargo test                    # all tests
cargo test -p dies-world      # one crate
cargo fmt && cargo clippy
cd webui && pnpm run tsc      # TypeScript type check

Debugging hangs

Install tokio-console with cargo install --locked tokio-console and run it while Dies is running. It shows the state of every async task.