No description
  • Rust 96.8%
  • SCSS 3.2%
Find a file
2026-03-22 20:08:56 +00:00
.cargo feat: wake lock for big screen 2026-03-18 13:05:13 +00:00
.sqlx feat: build instructions, sqlx prepared queries 2026-03-20 18:33:51 +00:00
migrations feat: guest/full accounts, auth rework 2026-03-19 18:18:55 +00:00
public feat: past games lists for players and hosts 2026-03-17 15:15:37 +00:00
style feat: saved setups with local storage 2026-03-22 20:08:56 +00:00
werewolves feat: saved setups with local storage 2026-03-22 20:08:56 +00:00
werewolves-macros feat: slight setup uplift + show auras 2026-03-22 13:21:17 +00:00
werewolves-proto feat: saved setups with local storage 2026-03-22 20:08:56 +00:00
werewolves-server host gets dead chat too 2026-02-04 14:46:31 +00:00
.gitignore overrides + arcanist fixes 2026-02-22 23:15:24 +00:00
Cargo.lock feat: saved setups with local storage 2026-03-22 20:08:56 +00:00
Cargo.toml feat: saved setups with local storage 2026-03-22 20:08:56 +00:00
LICENSE.md add AGPLv3 license and accompanying file headers 2025-11-06 10:24:51 +00:00
README.md feat: build instructions, sqlx prepared queries 2026-03-20 18:33:51 +00:00

werewolves

webapp for running in-person games of the social deduction game "werewolf". runs on the concept of a host with two screens:

  • privately-facing screen (such as their phone or a tablet) that they will be running the game from
  • public-facing screen ("big screen") that will display information to all players during the day, and prompt night actions during the night

building

prerequisites

werewolves is written in rust and uses leptos as its wasm framework, therefore the tooling required to build werewolves is:

  • rust
  • cargo-leptos
    • once rust is installed, you can install cargo-leptos by running: cargo install --locked cargo-leptos

build environment variables

build-time environment

these values are taken at build-time and cannot be changed once built

variable description default value
BASE_URL the server's url that will be used for generating the joining qr code https://wolf.emilis.dev/
DEBUG adds 20 dummy players for testing to any created game -

run-time environment

these values will be read while the server runs

variable description default value
HOST host to listen on 127.0.0.1
PORT port to listen on 3000
MAX_DB_CONNECTIONS maximum number of database connections in the database pool 30
PG_CONN_STRING connection string to connect to the postgres database postgres:///werewolves?host=/var/run/postgresql

for the database url, it is advised to use unix sockets if the database is on the same machine

building (real)

with the right environment variable set, you can use the following command to build a release build:

cargo leptos build --release

release builds will take a while to build. they are intionally run with 1 codegen-units, which removes any parallelism, but might improve optimization. more info.

currently, release builds take ~5 minutes to build on my machine with an AMD Ryzen 9 7950X3D

development builds

to build werewolves for development run the command

cargo leptos watch

this will run it in watch-mode, recompiling and re-serving the application every time there's a change to a rust file

migrations

migrations will run automatically.

binary output

the project compiles to a single server binary. it is statically linked and embeds all the resources it serves.

it will be found at target/release/werewolves for release builds.