From 3fc1096500887be18ab9d15e9630ac56240a7e9a Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 1 Sep 2026 05:27:10 +0200 Subject: [PATCH] fmt: README.md files and .cargo/config.toml --- tdkpin-rs/.cargo/config.toml | 36 ++++++++++++++-------------- tdkpin-rs/highscore-server/README.md | 8 +++---- tdkpin-rs/web/README.md | 7 +++--- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/tdkpin-rs/.cargo/config.toml b/tdkpin-rs/.cargo/config.toml index 7096228..9980b2e 100644 --- a/tdkpin-rs/.cargo/config.toml +++ b/tdkpin-rs/.cargo/config.toml @@ -1,21 +1,21 @@ [target.wasm32-unknown-unknown] rustflags = [ - "-C", - "link-arg=--import-undefined", - "-C", - "link-arg=--export=tdkpin_storage_crate_version", - "-C", - "link-arg=--export=tdkpin_browser_storage_clear", - "-C", - "link-arg=--export=tdkpin_browser_storage_push", - "-C", - "link-arg=--export=tdkpin_browser_storage_finish", - "-C", - "link-arg=--export=tdkpin_browser_storage_save_revision", - "-C", - "link-arg=--export=tdkpin_browser_storage_save_length", - "-C", - "link-arg=--export=tdkpin_browser_storage_save_byte", - "-C", - "link-arg=--export=tdkpin_browser_storage_save_ack", + "-C", + "link-arg=--import-undefined", + "-C", + "link-arg=--export=tdkpin_storage_crate_version", + "-C", + "link-arg=--export=tdkpin_browser_storage_clear", + "-C", + "link-arg=--export=tdkpin_browser_storage_push", + "-C", + "link-arg=--export=tdkpin_browser_storage_finish", + "-C", + "link-arg=--export=tdkpin_browser_storage_save_revision", + "-C", + "link-arg=--export=tdkpin_browser_storage_save_length", + "-C", + "link-arg=--export=tdkpin_browser_storage_save_byte", + "-C", + "link-arg=--export=tdkpin_browser_storage_save_ack", ] diff --git a/tdkpin-rs/highscore-server/README.md b/tdkpin-rs/highscore-server/README.md index 0737e34..46740cd 100644 --- a/tdkpin-rs/highscore-server/README.md +++ b/tdkpin-rs/highscore-server/README.md @@ -14,9 +14,9 @@ response is the canonical top-ten JSON array. A newly created database starts with the original distributed demo table. An existing database, including an existing empty database, is left unchanged. -Submissions are anonymous and intentionally trust the browser's score. Add -rate limiting, moderation, or server-side run verification if the table needs -to resist forged scores. +Submissions are anonymous and intentionally trust the browser's score. Add rate +limiting, moderation, or server-side run verification if the table needs to +resist forged scores. Run it from `tdkpin-rs` with: @@ -27,7 +27,7 @@ cargo run --manifest-path highscore-server/Cargo.toml ``` Copy the rate and connection zone declarations from -[nginx.conf.example](nginx.conf.example) into the existing `http` block, then +[nginx.conf.example](./nginx.conf.example) into the existing `http` block, then place its two `location` blocks inside the public site's `server` block. The example bounds per-client and aggregate API traffic, request bodies, and proxy waits. The browser client expects the API at `/api/highscores` on the same diff --git a/tdkpin-rs/web/README.md b/tdkpin-rs/web/README.md index 710bfe4..06c8837 100644 --- a/tdkpin-rs/web/README.md +++ b/tdkpin-rs/web/README.md @@ -16,9 +16,10 @@ bootstrap is local as well, so the page does not require inline or third-party JavaScript. The web page must be served over HTTP rather than opened directly from a `file:` URL. -For a strict Content Security Policy, allow `script-src 'self' -'wasm-unsafe-eval'` for the browser's WebAssembly compilation and -`connect-src 'self'` for the local WASM and optional high-score API requests. +For a strict Content Security Policy, allow +`script-src 'self' 'wasm-unsafe-eval'` for the browser's WebAssembly compilation +and `connect-src 'self'` for the local WASM and optional high-score API +requests. When the same-origin `/api/highscores` endpoint is available, the browser loads and submits the shared top-ten table there. The small Axum service and an nginx