diff --git a/README.md b/README.md index c9a9cf1..b937991 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,48 @@ # lanspread -## Description +Peer-to-peer game library sharing for LAN parties. Peers discover each other on +the local network via mDNS, exchange library metadata over QUIC, and let users +browse and download games from each other. Ships as a Tauri desktop app. -Peer-to-peer game library sharing for LAN parties. +## Build / install -- Peers let users browse and download games from each other -- they discover each other on the local network via mDNS -- they exchange library metadata over QUIC - -Ships as a Tauri desktop app. - -## Development - -### Prerequisites +Install Rust, Deno, and `just` first, then bootstrap the project: ```bash -# install Tauri CLI -cargo install tauri-cli - -# install Deno with a package manager or from https://deno.land/ +just setup ``` -### Build or Run +That installs the Tauri CLI with `cargo install tauri-cli` and installs the +Deno/npm dependencies from `crates/lanspread-tauri-deno-ts`. + +Run the desktop app in development mode: ```bash -# build -just build - -# run just run - -# test -just test ``` -### Scripted peer harness - -`crates/lanspread-peer-cli` runs the peer runtime without the GUI and speaks -JSONL on stdin/stdout. It is intended for automated multi-peer smoke tests. +Build without bundling: ```bash -just peer-cli-build -just peer-cli-image -just peer-cli-run alpha +just build ``` + +Create production bundles: + +```bash +just bundle +``` + +## Important just commands + +- `just setup` - install the Tauri CLI and frontend dependencies. +- `just run` - run the Tauri app in dev mode. +- `just build` - build the app without bundling. +- `just bundle` - create production bundles. +- `just fmt` - format Rust, TOML, and the justfile. +- `just clippy` - lint the Rust workspace. +- `just test` - run workspace tests. +- `just frontend-test` - run frontend tests. +- `just peer-cli-build` - build the JSONL peer test harness. +- `just peer-cli-image` - build the peer harness Docker image. +- `just peer-cli-run NAME` - run one peer harness container. diff --git a/justfile b/justfile index 23e42b1..3eb27aa 100644 --- a/justfile +++ b/justfile @@ -2,6 +2,10 @@ export RUSTFLAGS := "-C target-cpu=native" export WEBKIT_DISABLE_COMPOSITING_MODE := "1" export DOCKER_CONFIG := env_var_or_default("DOCKER_CONFIG", ".lanspread-peer-cli/docker-config") +setup: + cargo install tauri-cli + cd crates/lanspread-tauri-deno-ts && deno install --frozen=true + run: cargo tauri dev --release