A WebAssembly port of the WCA odds calculator.
You can visit the deployed website here: odds.nmckee.org
This guide will help you set up the project on your local machine for development and testing.
First, ensure you have the following tools installed:
To run the local development server, follow these steps:
# 1. Compile the Rust code to WebAssembly
# The output is placed in the 'wasm' directory
wasm-pack build --target web --out-dir wasm
# 2. Install project dependencies
bun install
# 3. Pre-cache common competitions
bun run setup/cache_comp.js setup/cache_list.json
# 4. Start the development server
bun devYou can create and run a production-ready build using either Docker (recommended) or by building manually.
The simplest way to run a production build is with Docker. From the project root, run:
docker compose upIf you prefer to build the project without Docker:
# 1. Compile Rust code with release optimizations
wasm-pack build --target web --release --out-dir wasm
# 2. Install project dependencies
bun install
# 3. Pre-cache common competitions
bun run setup/cache_comp.js setup/cache_list.json
# 4. Create the production build
bun run build
# 5. Preview the final build
bun preview*Note: This project uses bun for local development. The Docker configuration uses NodeJS due to some build compatibility issues in the Docker environment.