Capsule: deployment & hardening

Use when changing server bind/config, the build pipeline, or the input-hardening surface.

Read first

Run / build

cd server && cargo run            # serves client + /ws on RTS_ADDR; open the printed URL
cd server && cargo run --release  # fast build
cd server && cargo build && cargo clippy
node scripts/check-wiki.mjs       # wiki routes, generated stats, and catalog parity
node scripts/check-crate-boundaries.mjs

No JS build step (plain ES modules + PixiJS from CDN). The client is served from ../client relative to the server crate, so cargo run from server/ is the whole dev loop. Release Docker builds pin the repository Rust toolchain and use independent stages for the native rts-server binary and prediction WASM. Runtime client files are copied after both stages so client-only edits reuse the Rust layers. The WASM stage runs scripts/build-sim-wasm.sh into a separate output, and the final image fails if client/vendor/sim-wasm/rts_sim_wasm.js or rts_sim_wasm_bg.wasm is missing. Beta workflow summaries report each deploy phase and cache hit.

Invariants

Cross-capsule triggers