Skip to content

rockawayx-labs/zk-wordle

Repository files navigation

ZK WORDLE

The app is deployed here: http://zkwordle.rockawayx.com

screenshot-zk-wordle

Project Structure

This is a multi-package workspace (see definition in Cargo.toml).

  • frontend: react app using wasm proof verifier
  • backend: backend using Actix
  • core: shared core library
  • methods: source code from which ELF and ID is generated for Provers

Requirements

To compile Rust to WASM, we need to have the wasm32-unknown-unknown target installed.

rustup target add wasm32-unknown-unknown

wasm-pack for bundling verifier function to WASM

cargo install wasm-pack

cargo-make to run tasks defined in Makefile.toml.

cargo install cargo-make

Tasks

See the Makefile.toml for list of all available tasks.

Build

cargo make build

Run

cargo make run

Kill

If you kill the process by pressing CMD+C (or CTRC+C) it kill only the frontend running on port 8080. Make sure to kill the server running on port 9000 too.

List all processes running on port 9000:

lsof -i tcp:9000

Kill process given its PID

kill -9 <PID>

Docker

The easiest way to run the project is to use Docker.

First, build the image:

docker build -t zk-wordle .

Then, run it:

docker run -d -p 8080:8080 zk-wordle

You can now access the app at http://localhost:8080

System architecture

architecture

Game flow

game-flow