# Download page `index.php` scans `bin/client` and `bin/server` on every request and renders whatever builds it finds, with version, size and SHA-256. No database, no JavaScript, no CSS, no dependencies. The page is plain browser defaults: black text, blue links, monospace checksums. PHP 8.0+. ## Layout ``` web/ index.php bin/client/ served at /bin/client/... bin/server/ served at /bin/server/... ``` Serve `web/` as the document root. Binaries in `bin/` are gitignored. ## Naming The page only lists files that match the release pattern; anything else in those directories is ignored. ``` zagan-bet-client---[.exe] zagan-bet-server--- ``` `` is `MAJOR.MINOR.PATCH`, `` is `linux`, `windows` or `macos`, `` is `x86_64`, `i686` or `aarch64`. ## Publishing a build From the repository root: ```sh ./scripts/publish.sh ``` It reads the version from `Cargo.toml`, builds all four artifacts and installs them under `web/bin` with the names above. Override the destination with `DEST=/srv/www/bin ./scripts/publish.sh`. Builds are per target triple, so these must be installed: `x86_64-unknown-linux-gnu`, `i686-unknown-linux-gnu` and `x86_64-pc-windows-gnu`, plus the mingw linker for the Windows build. Client builds always pass `--no-default-features`, which drops the server's OpenSSL dependency; the client is rustls-only. Cargo itself cannot produce these names: it always writes `target//release/`. The script renames after each build. ## Preview locally ```sh php -S 127.0.0.1:8899 -t web ``` Then open . ## Notes - Hashes are computed per request with `hash_file()`. That is fine for a handful of builds; add an mtime-keyed cache if the directory grows. - The page lists every build it finds, newest version first, so old releases stay downloadable until you remove them from `bin/`. - The checksum block is in `sha256sum` format, so visitors can save it as `SHA256SUMS` and run `sha256sum -c SHA256SUMS`.