- Rust 92%
- Shell 3%
- JavaScript 2%
- Python 2%
- HTML <1%
- 1 more language <1%
protokill.sh #
a cyberpunk roguelike, written in Rust, deployed as WebAssembly, and integrated with ATProto.
Developing #
This repo is designed to be used with GitHub Codespaces. If you're doing something else, please check out .devcontainer/ for the list of tools and setup instructions.
Try running ./scripts/develop.sh to build and launch the game.
Default controls are documented in docs/CONTROLS.md.
tools/pk/ drives the real WASM build headlessly from the command line, for humans and agents: tools/pk/README.md.
Route report #
scripts/route-report.sh plays every map once per runner archetype, bot policy
and seed, and writes output/route-report.md and output/route-report.json.
A row names the pack routes the runner used in order, so a lifepath that loses
its way through a map shows up as a route nobody takes. --map <id> limits it
to one map; cargo test -p protokill_route_report runs the short CI check.
Continuous integration #
scripts/ci.sh lists the checks and runs the fast tier, which every branch
runs before review. scripts/ci.sh --full runs every test, the wasm tests
included; the nightly integration run (tools/integration) and
scripts/release.sh run it. .tangled/workflows/ci.yml runs the full tier as
well, but no spindle is attached to the repository, so that workflow does not
run today.
Deploying #
This project is configured to deploy via AWS Amplify.
./scripts/deploy.sh builds a preview with the full build stamp; ./scripts/deploy.sh --production (or PROTOKILL_PRODUCTION=1) is a production deploy, and its status bar shows just the release version. The commit and build time stay in build-info.json.
Releases are cut with scripts/release.sh; see RELEASING.md.
The deploy also writes protokill_wasm_frontend_bg.wasm.br and .gz next to the wasm. Amplify uploads every artifact, so both are reachable at their own URLs, but serving one of them for the .wasm request needs a rewrite or custom-header rule in the Amplify console: amplify.yml only defines the build.
Tech stack #
Debugging info #
Debugging WASM file sizes #
Compile settings can dramatically change WASM file sizes. If you need to analyze them, try:
twiggy top target/wasm32-unknown-unknown/web/protokill_wasm_frontend.wasm | head -n 10
Suggested reading #
- [https://surma.dev/things/rust-to-webassembly/](Rust to WebAssembly the hard way)